The problem here looks like m.input_data: x mapping in feed_dict past session.run() . In this case, TensorFlow expects x be a numpy array (or some object that can be implicitly converted to a numpy array), but this is a TensorFlow Tensor value (the result is tf.zeros_like() ).
Fortunately, the solution is simple. Replace x = tf.zeros_like(m.input_data) following text:
x = tf.zeros_like(m.input_data).eval()
... which ensures that x converted to a numpy array.
(Note that a more direct way to achieve this would be to create an initial x as a numpy array of the appropriate size.)
source share