tensorflow_models_learning icon indicating copy to clipboard operation
tensorflow_models_learning copied to clipboard

您好,用您预测的代码加载不了训练好的模型,查了好久也查不出来

Open linksjj opened this issue 5 years ago • 2 comments

NotFoundError (see above for traceback): Restoring from checkpoint failed. This is most likely due to a Variable name or other graph key that is missing from the checkpoint. Please ensure that you have not altered the graph expected based on the checkpoint. Original error:

Key InceptionV3/AuxLogits/Conv2d_1b_1x1/BatchNorm/beta not found in checkpoint [[Node: save_1/RestoreV2 = RestoreV2[dtypes=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, ..., DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_INT64], _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save_1/Const_0_0, save_1/RestoreV2/tensor_names, save_1/RestoreV2/shape_and_slices)]] [[Node: save_1/RestoreV2/_307 = _Recvclient_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device_incarnation=1, tensor_name="edge_312_save_1/RestoreV2", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:GPU:0"]]

linksjj avatar Aug 16 '19 07:08 linksjj

在predict文件中改一下代码 saver = tf.train.import_meta_graph("meta文件路径") saver.restore(sess, model文件路径)

GrayPaul avatar Sep 09 '19 03:09 GrayPaul

在predict文件中改一下代码 saver = tf.train.import_meta_graph("meta文件路径") saver.restore(sess, model文件路径) meta文件路径怎样查找呢?这样改的原因是什么

Instantnoodles-madman avatar Feb 25 '20 09:02 Instantnoodles-madman