I used the example at - https://github.com/aymericdamien/TensorFlow-Examples/blob/master/examples/5_DataManagement/tensorflow_dataset_api.py - to create my own classification model. I used different data but the basic outline of datasets was used.
It was important for my data type to shuffle the data and then create the training and testing sets. The problem however comes as a result of the shuffling.
When I train my model with the shuffled train set I get a +- 80% accuracy for train and +- 70% accuracy for the test set. I then want to input all the data (i.e. the set that made the training and test set) into the model to view the fully predicted output of this data set that I have.
If this data set is shuffled as the training and testing set was I get an accuracy of around 77% which is as expected but then if I input the unshuffled data (as I required to view the predictions) I get a 45% accuracy. How is this possible?
I assume it's due to the fact that the model is learning incorrectly and that it learns that the order of the data points plays a role in the predicting of those data points. But this shouldn't be happening as I am simply trying to (like the mnist example) predict each data point separately. This could be a mini-batch training problem.
So I ask, in the example mentioned above, using data sets and batches to train, does the model learn from the average of all the data points in the mini-batch or does it think one mini-batch is one data point and learn in that manner (which would mean order matters of the data)?
Or if there are any other suggestions.