1
我使用tensorflow 1.0 ubuntu上16如何打开一个Tensorflow保护另一台计算机上
我使用的是保护作为folows,从一个例子在线:
saver = tf.train.Saver(name='saver', write_version=tf.train.SaverDef.V2)
sv = tf.train.Supervisor(logdir=FLAGS.save_path, save_model_secs=0, save_summaries_secs=0, saver=saver)
它运行和训练良好,但是我不能从另一台计算机运行示例模式,因为保存路径作为另一台计算机的旧目录保持不变。
错误我得到的是这样的:
InvalidArgumentError (see above for traceback): Unsuccessful TensorSliceReader constructor: Failed to get matching files on /home/oldpc/model/-54: Not found: /home/oldpc/model
[[Node: saver/RestoreV2 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_recv_saver/Const_0, saver/RestoreV2/tensor_names, saver/RestoreV2/shape_and_slices)]]
[[Node: saver/restore_all/NoOp_1/_20 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/gpu:0", send_device="/job:localhost/replica:0/task:0/cpu:0", send_device_incarnation=1, tensor_name="edge_56_saver/restore_all/NoOp_1", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/gpu:0"]()]]
它应该加载,因为我通过CMD线传递的路径,应该是--save_path =“家用/ newpc /模型/”
的代码是从here
@smith是否解决了您的问题? – finbarr
是的,我不得不在检查点文件中更改它。 – smith