-
shape
可以写成[]
或者None
。
import tensorflow as tf
import numpy as np
a = tf.placeholder(shape=[],dtype=tf.int32,name='ab')
with tf.Session() as sess:
print(sess.run(a,feed_dict={'ab:0':1}))
shape
可以写成[]
或者None
。import tensorflow as tf
import numpy as np
a = tf.placeholder(shape=[],dtype=tf.int32,name='ab')
with tf.Session() as sess:
print(sess.run(a,feed_dict={'ab:0':1}))
本文标题:[tf]placeholder如果只是传递一个数字那么shape
本文链接:https://www.haomeiwen.com/subject/covljqtx.html
网友评论