I am getting confused in how to use placeholder for batch training. In my code, input image is of size 3 x 3. In order to do batch training, I am setting tf.placeholder(tf.float32,shape=[None,3,3])
.
When I try to give batches of 3x3 as an input, TensorFlow gives an error that
Cannot feed value of shape (3, 3) for Tensor u'Placeholder_1:0', which has shape '(?, 3, 3).
Below is the code
input = np.array([[1,1,1],[1,1,1],[1,1,1]])
placeholder = tf.placeholder(tf.float32,shape=[None,3,3])
init = tf.global_variables_initializer()
with tf.Session() as sess:
sess.run(init)
sess.run(placeholder, feed_dict{placeholder:input})