我已经在自定义数据集上运行了tensoflow的retrain.py
脚本。训练过程结束后,我得到了预期的输出文件output_graph.pb
和output_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)]]
有人知道为什么某些变量可能未正确初始化吗?