I\'ve been playing with the Tensorflow library doing the tutorials. Now I wanted to play with my own data, but I fail horribly. This is perhaps a noob question but I can\'t
This error arises because the shape of the data that you're trying to feed (104 x 96 x 96 x 1) does not match the shape of the input placeholder (batch_size
x 9216, where batch_size
may be variable).
To make it work, add the following line before running a training step:
batch_xs = np.reshape(batch_xs, (-1, 9216))
This uses numpy to reshape the images read in, which are 4-D arrays of batch_size
x h x w x channels, into a batch_size
x 9216 element matrix as expected by the placeholder.
I solved this problem by upgrading tensorflow through pip.