Reshape and write ImageDataGenerator output to CSV file
问题 I'm working with the MNIST data set. I have the training data vectors in one CSV file (i.e. 60,000 rows, each with 784 columns), and the labels in a separate CSV file. I want to bulk up the amount of training data, and append it to the CSV. It has to be done like this, because then the CSV file has to be fed in to a separate pipeline. I originally wrote this script: import keras from keras.preprocessing.image import ImageDataGenerator import pandas as pd X_train = pd.read_csv('train-images