重新训练后Tensorflow label_image NotFoundError

时间:2018-11-01 10:48:31

标签: python python-3.x tensorflow machine-learning pre-trained-model

我已经在自定义数据集上运行了tensoflow的retrain.py脚本。训练过程结束后,我得到了预期的输出文件output_graph.pboutput_labels.txt。 但是,当我尝试使用最新的tensorflow的label_image.py脚本在看不见的图像上预测标签时,出现此错误:

NotFoundError (see above for traceback): Error while reading resource variable module/InceptionV3/Mixed_7c/Branch_3/Conv2d_0b_1x1/BatchNorm/moving_mean from Container: localhost. This could mean that the variable was uninitialized. Not found: Container localhost does not exist. (Could not find resource: localhost/module/InceptionV3/Mixed_7c/Branch_3/Conv2d_0b_1x1/BatchNorm/moving_mean)
         [[Node: import/module_apply_default/InceptionV3/InceptionV3/Mixed_7c/Branch_3/Conv2d_0b_1x1/BatchNorm/FusedBatchNorm/ReadVariableOp = ReadVariableOp[dtype=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"](import/module/InceptionV3/Mixed_7c/Branch_3/Conv2d_0b_1x1/BatchNorm/moving_mean)]]

有人知道为什么某些变量可能未正确初始化吗?

0 个答案:

没有答案