我的系统设置 操作系统:Ubuntu 16.04LTS GPU:GTX1060 tensorflow版本:tensorflow-gpu(1.6.0)
我正在尝试重新训练使用https://github.com/tensorflow/models/blob/master/research/slim/train_image_classifier.py在MSCeleb-1M数据集上训练的inceptionV3分类器模型。
然后我尝试使用https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/image_retraining/retrain.py使用自定义图像和类重新训练。
我注意到该脚本是针对过时的inceptionV3架构的,因此我修改了瓶颈张量并输入张量名称以匹配我重新训练的inceptionV3模型的节点。但是,当将自己的图像输入重新训练脚本时,我会继续发出此错误
INFO:tensorflow:Creating bottleneck at /home/m360/MachineLearning/models/msceleb-small-inception-v3/bottleneck/tulips/5524946579_307dc74476.jpg_inception_v3.txt
Traceback (most recent call last):
File "tensorflow/examples/image_retraining/retrain.py", line 1486, in <module>
tf.app.run(main=main, argv=[sys.argv[0]] + unparsed)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 126, in run
_sys.exit(main(argv))
File "tensorflow/examples/image_retraining/retrain.py", line 1187, in main
bottleneck_tensor, FLAGS.architecture)
File "tensorflow/examples/image_retraining/retrain.py", line 500, in cache_bottlenecks
resized_input_tensor, bottleneck_tensor, architecture)
File "tensorflow/examples/image_retraining/retrain.py", line 442, in get_or_create_bottleneck
bottleneck_tensor)
File "tensorflow/examples/image_retraining/retrain.py", line 397, in create_bottleneck_file
str(e)))
RuntimeError: Error during processing file /home/m360/MachineLearning/my_dataset/flower_photos/tulips/5524946579_307dc74476.jpg (20)
我不明白哪里出了问题,因为到目前为止我在网上找不到关于这个特定异常代码的文档。我认为脚本中的decode_jpeg函数可能存在问题,但无法解决它。
请帮助赐教。非常感谢你。