Reputation: 178
I am working on tensorflow with MNIST database.
After extracting the database using the input_data.read_data_sets Function,
from tensorflow.examples.tutorials.mnist import input_data
data = input_data.read_data_sets('data/MNIST/', one_hot=True)
I get data.train.images which is an array containing arrays of images.
I want to add my own image array onto this, as they are numpy arrays I cannot use the standard append function.
When I use the numpy.append() function, it creates a new array rather than mutate the existing one.
data.test.images is array of 55000 arrays each of 784(float32)values,
A is an array of 784(float32)values
The problem is when I try
data.train.images=np.append(data.train.images, [A],axis=0)
I get the error saying: " can't set attribute "
How do I get through this conundrum?
Upvotes: 1
Views: 570