[英]Error while training: tensorflow:Your input ran out of data; interrupting training
I'm trying to execute the colab notebook associated to the following link that trains Keras Retinanet in order to find objects inside images:我正在尝试执行与以下链接相关联的 colab 笔记本,该链接训练 Keras Retinanet 以查找图像中的对象:
https://www.freecodecamp.org/news/object-detection-in-colab-with-fizyr-retinanet-efed36ac4af3/ https://www.freecodecamp.org/news/object-detection-in-colab-with-fizyr-retinanet-efed36ac4af3/
However, even if I follow entirely the guide, when I start the train with the line :但是,即使我完全遵循指南,当我使用以下线路启动火车时:
!keras_retinanet/bin/train.py --freeze-backbone --random-transform --weights {PRETRAINED_MODEL} --batch-size 8 --steps 500 --epochs 10 csv annotations.csv classes.csv
I get this error at the first epoch:我在第一个纪元收到此错误:
WARNING:tensorflow:Your input ran out of data; interrupting training. Make sure that your dataset or generator can generate at least `steps_per_epoch * epochs` batches (in this case, 5000 batches). You may need to use the repeat() function when building your dataset.
This even if, I repeat, I'm following exactly the notebook.即使我重复一遍,我也完全按照笔记本进行操作。
I also tried to train using the Pascal VOC as in the official github repo (by fizyr) is specified, but I get again this error.我还尝试使用 Pascal VOC 进行训练,因为在官方 github 存储库(由 fizyr 提供)中指定,但我再次收到此错误。
Can someone help me?有人能帮我吗? Thanks
谢谢
EDIT: I managed to solve, by removing the default number of train steps in the train.py file, leaving keras to calculate itself the proper number steps automatically.编辑:我设法解决了,通过删除 train.py 文件中的默认火车步数,让 keras 自动计算正确的步数。 I found the solution as posted by hansoli68 in the following thread: https://github.com/fizyr/keras-retinanet/issues/1449
我在以下线程中找到了hansoli68发布的解决方案: https : //github.com/fizyr/keras-retinanet/issues/1449
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.