tensorflow tf.placeholder
来源:互联网 发布:python base64.decode 编辑:程序博客网 时间:2024/06/11 22:22
tf.placeholder(dtype, shape=None, name=None)
Inserts a placeholder for a tensor that will be always fed.(可以理解为创建一个占位符,且这个占位符在运行前必须进行初始化,即f bd ed)
Important: This tensor will produce an error if evaluated. Its value must be fed using the feed_dict optional argument to Session.run(), Tensor.eval(), or Operation.run().
For example:
x = tf.placeholder(float, 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.
Args:
dtype: The type of elements in the tensor to be fed.(占位符里面的数据类型)
shape: The shape of the tensor to be fed (optional). If the shape is not specified, you can feed a tensor of any shape.(tensor的形状)
name: A name for the operation (optional).
Returns:
A Tensor that may be used as a handle for feeding a value, but not evaluated directly.
阅读全文
0 0
- 【Tensorflow】tf.placeholder函数
- Tensorflow tf.placeholder函数
- tensorflow tf.placeholder
- 【Tensorflow】tf.placeholder函数
- TensorFlow 插曲-- tf.placeholder 与 tf.Variable
- TensorFlow函数——tf.placeholder()
- TensorFlow 辨异 —— tf.placeholder 与 tf.Variable
- TensorFlow 辨异 —— tf.placeholder 与 tf.Variable
- TensorFlow 辨异 —— tf.placeholder 与 tf.Variable
- TensorFlow 辨异 —— tf.placeholder 与 tf.Variable
- tf.placeholder()
- tf.placeholder()
- tf.placeholder
- TensorFlow学习之路(0):tf.placeholder() & feed_dict={}
- 3. Tensorflow学习笔记之tf.placeholder函数
- TensorFlow-placeholder
- tensorflow placeholder()
- tensorflow_api_3:tf.placeholder( )
- 8位不重复数字的正则表达式
- 1023. 组个最小数
- 编程珠玑 课后题答案 4.2
- db2常用命令
- 有时间去看这个博客
- tensorflow tf.placeholder
- 设计模式之原型模式
- Archlinux系统移植
- [BZOJ P1821]部落划分
- 回溯经典剪枝——小木棍
- Codeforces 832D Misha, Grisha and Underground
- iO逆向 触动精灵网络请求
- img等比例缩放
- 浅谈图片压缩方式