What's the difference between tf.placeholder and tf.Variable?

前端 未结 14 888
余生分开走
余生分开走 2020-12-07 06:33

I\'m a newbie to TensorFlow. I\'m confused about the difference between tf.placeholder and tf.Variable. In my view, tf.placeholder is

14条回答
  •  臣服心动
    2020-12-07 07:16

    The difference is that with tf.Variable you have to provide an initial value when you declare it. With tf.placeholder you don't have to provide an initial value and you can specify it at run time with the feed_dict argument inside Session.run

提交回复
热议问题