简体   繁体   English

使用TF-slim评估重新调整的Inception-v3模型时,“在检查点中找不到张量”

[英]“tensor not found in the checkpoint” when evaluating the re-tuned inception-v3 model using TF-slim

When I evaluated the re-tuned inception-v3 model with my dataset using eval_image_classifier.py in TF-slim, I got an error: 当我在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)]]

Then I printed all tensors' names in the orignal inception-v3 checkpoint and the re-tuned checkpoint, then compared these tensors with tensors inception_v3.arg_scope, I found that some tensors in the checkpoint were different from that in the inception_v3.arg_scope: 然后我将所有张量的名称打印在原始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 checkpoints

Has the architecture of inception_v3 changed before? inception_v3的体系结构之前是否进行过更改? How to solve this problem? 如何解决这个问题呢? Retrain the whole inception-v3 model with inception_v3.arg_scope rather than re-tuning? 使用inception_v3.arg_scope重新训练整个inception-v3模型,而不是重新调整?

tf.reset_default_graph()添加到python脚本中,它将解决此问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM