tf.placeholder代码详解

tf.placeholder(dtype, shape, name) 

作用:创建一个类型为dtype,形状为shape,名字为name的一个Tensor类型

返回值:一个tensor类型

注意:tf.placeholder生成的tensor并不能直接print,需要通过sess.run才能够得到值

例子:

tensorflow版本为1.10

发布了8 篇原创文章 · 获赞 5 · 访问量 1414

猜你喜欢

转载自blog.csdn.net/Li7819559/article/details/103811310