Tensorflow使用レコード、API使用エラー処理

2504 ワード

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({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がセッションbundleをエクスポートする方法は廃棄されました.
     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はセッションBundleを保存します.https://github.com/tensorflow/tensorflow/blob/a304537954a865752ad1b18461e6bd67b36082db/tensorflow/python/saved_model/README.md http://blog.csdn.net/thriving_fcl/article/details/75213361 Tensorflow保存とリカバリモデルの2つの方法について、図面構造を再定義する必要があるかどうかを区別します.http://blog.csdn.net/thriving_fcl/article/details/71423039 http://blog.csdn.net/marsjhao/article/details/72829635