tensorflow框架学习(一)placeholder 与variable
来源:互联网 发布:快递数据统计员 编辑:程序博客网 时间:2024/06/07 08:20
1. placeholder —占位符
参考 http://www.tensorfly.cn/tfdoc/api_docs/python/io_ops.html
placeholder, 译为占位符,官方说法:”TensorFlow provides a placeholder operation that must be fed with data on execution.” 即必须在执行时feed值。
placeholder 实例通常用来为算法的实际输入值作占位符。例如,在MNIST例子中,定义输入和输出:
x = tf.placeholder(tf.float32, [None, 784])#表示成员类型float32, [None, 784]是tensor的shape, None表示第一维是任意数量,784表示第二维是784维y_ = tf.placeholder(tf.float32, [None, 10])
2. variable —变量
参考:http://www.tensorfly.cn/tfdoc/how_tos/variables.html
当训练模型时,用variable来存储和更新参数。用于表示算法迭代过程中的中间参数。
variable实例化时必须有初始值。MNist中,定义w和b:
W = tf.Variable(tf.zeros([784, 10]))b = tf.Variable(tf.zeros([10]))
0 0
- tensorflow框架学习(一)placeholder 与variable
- TensorFlow 学习积累(1):variable 和 placeholder
- tensorflow中Variable和Placeholder的学习
- TensorFlow 插曲-- tf.placeholder 与 tf.Variable
- TensorFlow Session&&Variable&&PlaceHolder
- TensorFlow Variable, Placeholder 以及激励函数学习小结
- TensorFlow 辨异 —— tf.placeholder 与 tf.Variable
- TensorFlow 辨异 —— tf.placeholder 与 tf.Variable
- TensorFlow 辨异 —— tf.placeholder 与 tf.Variable
- TensorFlow 辨异 —— tf.placeholder 与 tf.Variable
- Tensorflow 的组件 placeholder,Variable
- tensorflow学习笔记(二十三):variable与get_variable
- tensorflow 学习笔记2 session与Variable
- tensorflow学习笔记:variable与get_variable
- tensorflow学习:placeholder用法
- TensorFlow学习之 placeholder
- 【TensorFlow】框架学习笔记tensor(一)
- 深度学习框架TensorFlow学习与应用(一)——基本概念与简单示例
- Python 3基础教程9-函数
- 纯JQ实现全屏滚动【无插件】
- Android仿广播通信实现简单的应用间service与activity之间的数据通信
- Codeforces-803F-Coprime Subsequences(筛)
- Java合并多个byte[]为一个byte[]
- tensorflow框架学习(一)placeholder 与variable
- 【笔记】HMM模型论文阅读笔记(一)
- Model2
- 欢迎使用CSDN-markdown编辑器
- 一个不一样的ajax
- idea 2017破解码
- MapStruct 代替BeanUtil 和ModelMapper
- hibernate双向一对多关联映射XML与注解版
- java4种线程池的基本使用