下面是我查到的結果,詳細的可以
A placeholder is simply a variable that we will assign data to at a later date --- Placeholders - Learning Tensorflow.com
簡單來講就是一個之後可以儲存值的變數 (想像一下 向量 或是 Tensor )
x = tf.placeholder("float", 3)
First, we import tensorflow as normal. Then we create a placeholder called x, i.e. a place in memory where we will store value later on. The 3 on this line denotes that we will store three values in this placeholder.
所以,等等 x 可以被儲存3個浮點數進去
當然,也可以不指定 x 的儲存數量,例如以下
x = tf.placeholder("float", None)
沒有留言:
張貼留言