tensorflow_models_learning
tensorflow_models_learning copied to clipboard
您好,用您预测的代码加载不了训练好的模型,查了好久也查不出来
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"]]
在predict文件中改一下代码 saver = tf.train.import_meta_graph("meta文件路径") saver.restore(sess, model文件路径)
在predict文件中改一下代码 saver = tf.train.import_meta_graph("meta文件路径") saver.restore(sess, model文件路径) meta文件路径怎样查找呢?这样改的原因是什么