微调tensorflow对象检测模型时的ValueError

时间:2018-04-19 14:03:55

标签: python tensorflow object-detection

我正在自定义数据集上训练一个物体检测模型,并从Tensorflow模型动物园中微调ssd_inception_v2预训练模型。训练脚本指向tarball中给出的model.ckpt.index。

Tensorflow返回ValueError异常(无需保存的变量),并显示有关权重不存在的警告: WARNING:root:Variable [FeatureExtractor/InceptionV2/Mixed_5c_2_Conv2d_5_3x3_s2_128/BatchNorm/beta/RMSProp_1] is not available in checkpoint [0/1875] WARNING:root:Variable [FeatureExtractor/InceptionV2/Mixed_5c_2_Conv2d_5_3x3_s2_128/BatchNorm/gamma] is not available in checkpoint WARNING:root:Variable [FeatureExtractor/InceptionV2/Mixed_5c_2_Conv2d_5_3x3_s2_128/BatchNorm/gamma/ExponentialMovingAverage] is not available in checkpoint WARNING:root:Variable [FeatureExtractor/InceptionV2/Mixed_5c_2_Conv2d_5_3x3_s2_128/BatchNorm/gamma/RMSProp] is not available in checkpoint WARNING:root:Variable [FeatureExtractor/InceptionV2/Mixed_5c_2_Conv2d_5_3x3_s2_128/BatchNorm/gamma/RMSProp_1] is not available in checkpoint WARNING:root:Variable [FeatureExtractor/InceptionV2/Mixed_5c_2_Conv2d_5_3x3_s2_128/BatchNorm/moving_mean] is not available in checkpoint WARNING:root:Variable [FeatureExtractor/InceptionV2/Mixed_5c_2_Conv2d_5_3x3_s2_128/BatchNorm/moving_variance] is not available in checkpoint WARNING:root:Variable [FeatureExtractor/InceptionV2/Mixed_5c_2_Conv2d_5_3x3_s2_128/weights] is not available in checkpoint WARNING:root:Variable [FeatureExtractor/InceptionV2/Mixed_5c_2_Conv2d_5_3x3_s2_128/weights/ExponentialMovingAverage] is not available in checkpoint WARNING:root:Variable [FeatureExtractor/InceptionV2/Mixed_5c_2_Conv2d_5_3x3_s2_128/weights/RMSProp] is not available in checkpoint WARNING:root:Variable [FeatureExtractor/InceptionV2/Mixed_5c_2_Conv2d_5_3x3_s2_128/weights/RMSProp_1] is not available in checkpoint 还有更多这样的错误。我也尝试过ssd_mobilenet_v2,但错误相同。我刚刚更改了配置文件中的类数以及“PATHS_TO_BE_CONFIGURED”。

在GPU上使用tensorflow 1.7。

1 个答案:

答案 0 :(得分:0)

在CPU上使用TensorFlow 1.7在Windows 7上遇到同样的问题。如果'微调'关闭,代码运行没有错误。