当我使用TF-slim中的eval_image_classifier.py使用我的数据集评估重新调优的inception-v3模型时,我得到了一个错误:
NotFoundError (see above for traceback): Key InceptionV3/AuxLogits/Conv2d_2a_3x3/weights not found in checkpoint
[[Node: save/RestoreV2_7 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save/Const_0_0, save/RestoreV2_7/tensor_names, save/RestoreV2_7/shape_and_slices)]]然后,我打印了原始inception v3检查点和重新调整的检查点中所有张量的名称,然后将这些张量与张量inception_v3.arg_scope进行比较,我发现检查点中的一些张量与inception_v3.arg_scope中的不同:
"InceptionV3/AuxLogits/Conv2d_2a_3x3" in the inception_v3.arg_scope
"InceptionV3/AuxLogits/Conv2d_2a_5x5" in the checkpointsinception_v3的架构以前有变化吗?如何解决这个问题?用inception_v3.arg_scope重新训练整个inception-v3模型,而不是重新调优?
发布于 2018-04-01 00:13:35
将tf.reset_default_graph()添加到python脚本中,它会像这样修复问题。
https://stackoverflow.com/questions/49572606
复制相似问题