我知道tf.placeholder的基本用法:
x = tf.placeholder(tf.float32, shape=(1024, 1024))
y = tf.matmul(x, x)
with tf.Session() as sess:
print(sess.run(y)) # ERROR: will fail because x was not fed.
rand_array = np.random.rand(1024, 1024)
print(sess.run(y, feed_dict={x: rand_array})) # Will succeed.
Run Code Online (Sandbox Code Playgroud)
我知道第二个参数是关于形状的.但是当形状中第一个是None时,我不知道这是什么意思.例如:[无,784].
归档时间: |
|
查看次数: |
13730 次 |
最近记录: |