tensorflow 注意命名
来源:互联网 发布:剑指offer java版 编辑:程序博客网 时间:2024/09/21 08:17
这个报错不是数据feed的问题,而是等号左边的g_loss经过一次运算后得到了数值结果,覆盖了原来的g_loss操作,tf处理不了这种命名冲突,所以给变量用名字要注意啊
g_loss=0.01*gen_s_loss+g_c_loss本身是一个操作。
循环执行一次后就报错
g_loss = sess.run(g_loss, feed_dict={in_: batch_con,s_img: batch_fake})
TypeError: Fetch argument 0.30283719 has invalid type <type 'numpy.float32'>, must be a string or Tensor. (Can not convert a float32 into a Tensor or Operation.)
参考:https://stackoverflow.com/questions/38306330/tensorflow-typeerror-on-session-run-arguments-output/
还有就是不同的scope之间的命名,要利用好,这在BP传播的时候很重要,另外,一定要注意tf.variable 与tf.get_variable的差异,不要让这个折磨到吐血
阅读全文
1 0
- tensorflow 注意命名
- JNDINAME 命名注意
- 注意命名啊
- thinkphp model 命名注意
- C++命名注意
- TensorFlow 变量共享,命名空间
- 14、TensorFLow 变量命名空间
- Tensorflow安装的注意点
- 安装tensorflow注意几点
- jsp action命名应注意
- python注意之module命名
- mybatis命名空间namespace注意
- laravel方法命名需注意
- Tensorflow 变量命名空间及变量重用
- Tensorflow 变量命名空间及变量重用
- tensorflow 学习笔记14 scope命名方式
- TensorFlow命名空间和TensorBoard图节点
- TensorFlow 需注意的细节问题
- pthread_join和pthread_detach的作用
- iOS json 数据遇到[__NSCFString count] 错误
- Js apply()使用详解
- I/O事件分派
- android自定义弹出框样式实现
- tensorflow 注意命名
- 网络编程UDP和TCP的简单使用
- OPC client学习 2017.5.18
- uva213解题报告
- 排序算法总结(1)--选择排序
- 初试tensorflow
- vb.net 教程 3-11 窗体控件综合编程 2-1
- python sqlite3 数据库学习
- MFC中一些类型的转换