0
如何給出批量輸入打印張量的形狀?下面的代碼不起作用如何在張量流中打印張量形狀?
x_in = tf.identity(x_)
print_x_in = tf.Print(x_in, x_in.get_shape())
init = tf.global_variables_initializer()
# Start a new TF session
sess = tf.Session()
# Run the initializer
sess.run(init)
# feed in batch
sess.run(x_in, feed_dict={x_: x[1:10,:,:,:]})