使用TFslim评估retuned inceptionv3模型时,“在检查点中找不到张量”

2024-09-30 22:22:19 发布

您现在位置:Python中文网/ 问答频道 /正文

当我使用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\u v3.arg\u范围中的张量进行比较,发现检查点中的一些张量与inception\u v3.arg\u范围中的张量不同:

"InceptionV3/AuxLogits/Conv2d_2a_3x3" in the inception_v3.arg_scope
"InceptionV3/AuxLogits/Conv2d_2a_5x5" in the checkpoints

《盗梦空间》v3的架构以前有没有改变?如何解决这个问题?用inception\uv3.arg\u范围重新训练整个inception-v3模型,而不是重新调整?你知道吗


Tags: thein模型devicesavetfevalarg