Tensorflow使用记录,API使用报错处理
来源:互联网 发布:淘宝义卖作文 编辑:程序博客网 时间:2024/05/16 10:17
1.Cannot interpret feed_dict key as Tensor: The name ‘x’ refers to an operation,
not a Tensor. Tensor names must be of the form “:”.
sess.run(y, {tf.get_default_graph().get_operation_by_name(‘x’).outputs[0]: [1, 2, 3]})
x 后面需要加上0,tf.get_default_graph().get_operation_by_name(‘x:0’).
详见
http://blog.csdn.net/ztf312/article/details/72859075
http://stackoverflow.com/a/37870634/419116
2.WARNING:tensorflow:From export_session_bundle.py:17: classification_signature (from tensorflow.contrib.session_bundle.exporter) is deprecated and will be removed after 2017-06-30.
之前的通过tensorflow.contrib.session_bundle.exporter导出sessionbundle的方式已经废弃。
saver.restore(sess, cktpath) #saver.restore(sess, "save/model.ckpt") # 通过张量的名称来获取张量 model_exporter = exporter.Exporter(saver) #signature = exporter.classification_signature(input_tensor=external_x, classes_tensor=classes, scores_tensor=scores) signature = exporter.classification_signature(input_tensor=tf.get_default_graph().get_tensor_by_name("input_x:0"), classes_tensor=tf.get_default_graph().get_tensor_by_name("input_y:0")) model_exporter.init(sess.graph.as_graph_def(),default_graph_signature=signature, init_op=tf.initialize_all_tables()) model_exporter.export("./export", tf.constant(time.time()), sess)
改用新的方式SavedModel保存sessionBundle。
https://github.com/tensorflow/tensorflow/blob/a304537954a865752ad1b18461e6bd67b36082db/tensorflow/python/saved_model/README.md
http://blog.csdn.net/thriving_fcl/article/details/75213361
关于Tensorflow保存和恢复模型的两种方式,区别在于是否需要再定义图结构。
http://blog.csdn.net/thriving_fcl/article/details/71423039
http://blog.csdn.net/marsjhao/article/details/72829635
- Tensorflow使用记录,API使用报错处理
- 使用mysql_real_escape_string报错处理
- fckeditor使用和报错处理
- php使用GearmanClient 报错处理方式
- SB/XIB使用过程报错处理
- Django之使用extra报错处理
- tensorflow object detection API 使用记录1
- tensorflow object detection API 使用记录2
- tensorflow object detection API 使用记录3
- tensorflow object detection API 使用记录2
- Cygwin中使用svn ci报错处理
- 64位linux中使用inet_ntoa报错处理
- for in 循环在python3.3使用报错处理
- 【安装】nodesj的addon模块配置使用&报错处理
- Unity3D中C#使用指针(Unsafe)报错处理
- nodesj的addon模块配置使用&报错处理
- Qt5 简单使用webview 和openssl报错处理
- EhCache配置报错处理方法记录
- Servlet请求转发和重定向
- Spark on YARN cluster & client 模式作业运行全过程分析
- 习题5.9
- TinyHttpd源码感悟
- LeetCode#96Unique Binary Search Trees
- Tensorflow使用记录,API使用报错处理
- STM32F4的GPIO模式
- SQLXXXXX=XX
- 13周Map
- LeetCode 136 SingleNumber
- 51nod 1421 最大mod值 (排序+二分搜索)
- Laravel 执行 php artisan route:cache 时报错 LogicException
- 浅析深究什么是中间件
- Git remote