What's the difference between tf.placeholder and tf.Variable
来源:互联网 发布:java键盘 上下左右监听 编辑:程序博客网 时间:2024/05/19 18:46
https://stackoverflow.com/questions/36693740/whats-the-difference-between-tf-placeholder-and-tf-variable
down vote
The difference is that with tf.Variable you have to provide an initial value when you declare it. With tf.placeholder you don’t have to provide an initial value and you can specify it at run time with the feed_dict argument inside Session.run
placeholder 用来表示输入和输出数据,不需要有初始值
for step in xrange(FLAGS.max_steps): feed_dict = { images_placeholder: images_feed, labels_placeholder: labels_feed, } _, loss_value = sess.run([train_op, loss], feed_dict=feed_dict)
Variable 在Seesion训练时候会改变,而且需要有初始值
阅读全文
0 0
- What's the difference between tf.placeholder and tf.Variable
- What’s the difference between a class variable and an instance variable?
- What's the difference between an event and a delegate?
- what's the difference between OnDraw and OnPaint
- What's the difference between stack and heap?
- What's the difference between LastWriteTime and ChangeTime in FILE_BASIC_INFO?
- What's the difference between Heap and Stack
- What's the difference between overload and override
- What's the difference between glibc and libc6?
- What's the difference between "but" and "yet"
- What's+the+difference+between+virtualization+and+cloud+computing?
- What's the difference between parallel and concurrent?
- What's the difference between program arguments and VM arguments?
- What's the difference between Template and Table in Smartforms
- What's the difference between “local” and “my” in Perl
- what's the difference between int (* f [])(); and int f[]();
- What's the difference between gcc and g++/gcc-c++?
- What's the difference between headsets and headphones?
- laravel 课程学习系列四----------------第四章.Laravel中的用户认证(Auth)
- Slim研读笔记二之造一款Slim应用
- 解决mac桌面无法右键的问题
- 浅析 i++ 与 ++i 的区别
- C Primer Plus (第六版)中文版 第七章 编程练习答案
- What's the difference between tf.placeholder and tf.Variable
- 合并的2种方法
- clamav安装
- device_create device_destroy 使用==mknod及通过class_create自动创建设备节点
- 区块链的乡村及涉农应用场景和创新之道——Globalvillage Ecology
- IOCP网络模型
- 51NOD-1437-旋转字符串
- OK6410开发板Linux-3.3.5驱动移植之DM900网卡驱动移植+NFS文件系统挂载
- 在javascript中使用el表达式