Tensorflow: How to feed a placeholder variable with a tensor?

前端 未结 4 1160
南旧
南旧 2020-12-10 10:47

I have a placeholder variable that expects a batch of input images:

input_placeholder = tf.placeholder(tf.float32, [None] + image_shape, name=\'input_images         


        
4条回答
  •  我在风中等你
    2020-12-10 11:02

    This works for me in latest version...maybe you have older version of TF?

    a = tf.Variable(1)
    sess.run(2*a, feed_dict={a:5}) # prints 10
    

提交回复
热议问题