annaplaces.blogg.se

Tensorflow permute mnist
Tensorflow permute mnist







This was repeated 10 times for 10 different permutation pair train/test splits. 1,000 samples were generated for each permutation pair. Some examples of the generated samples can be seen in Table 1. Once trained, the network was tested by inputting images based on the remaining 10 permutation pairs, and was required to predict the summations for them. To test this hypothesis, a network was trained with data generated using 90 of the possible 100 combinations of the digits 0–9 up to length 2. This forces the network to learn more than simply a mapping between individual images and labels as it is tested using digit combination pairs that it has not seen, meaning a direct mapping from an image or shape to a label would not function. To ensure that the network has indeed learned this, and is not simply mapping images to labels, a constraint was applied whereby the network is tested with a held back test set of previously unseen permutation pairs. The aim of this study is to attempt to find experimental evidence that would suggest that a network can be trained to perform the task of addition, when supplied with image data containing two digits that should be summed. This paper is an attempt to demonstrate that a network can learn more than a direct mapping from image to label, but is learning to analyse two separate regions of an image and combining what was recognised to produce the final output label. As far as the authors are aware, no previous work has concentrated on learning a mathematical operation in this way. This suggests that the network learned at first digit recognition, and subsequently the further task of addition based on the two recognised digits. Results were encouraging, with the network achieving an accuracy of over 90% on some permutation train/test splits. For testing the network, samples generated from previously unseen permutation pairs were fed into the trained network, and its predictions measured. A dataset was generated for all possible permutation pairs of length 2 for the digits 0–9 using MNIST as a basis for the images, with one thousand samples generated for each permutation pair.

tensorflow permute mnist

Crucially, the network was tested on permutation pairs that were not present during training in an effort to see if the network could learn the task of addition, as opposed to simply mapping images to labels.

tensorflow permute mnist

A convolutional neural network was trained with images consisting of two side-by-side handwritten digits, where the image’s label is the summation of the two digits contained in the combined image. In this paper, a neural network is trained to perform simple arithmetic using images of concatenated handwritten digit pairs.









Tensorflow permute mnist