【发布时间】:2019-06-08 12:29:44
【问题描述】:
我正在尝试让 model_main.py 文件适用于我正在创建的自定义对象检测器。但是,我似乎遇到了以下错误,并且无法弄清楚如何解决它。任何帮助,将不胜感激!
我正在运行以下命令:
sudo python3 /data/tensorflow/models/research/object_detection/model_main.py --pipeline_config_path=/data/tensorflow/models/research/object_detection/samples/configs/faster_rcnn_resnet50_coco.config —model_dir=/home/USER/TASK/models/faster_rcnn_resnet50_coco/ --num_train_steps=200000 --num_eval_steps=1500 --sample_1_of_n_eval_examples=1 --alsologtostderr
错误如下:
InvalidArgumentError (see above for traceback): Cannot batch tensors with different shapes in component 1. First element had shape [600,900,3] and element 1 had shape [512,1024,3].
完整的回溯位于https://pastebin.com/SktxTnix
我认为问题在于配置文件中的 image_resizer。可能我的图像太大,导致随机缓冲区内存不足的问题?但是,我无法通过更改最小和最大调整大小值来解决此问题。
编辑:在玩了一些之后,我不认为这是缓冲区大小的问题。我将它进一步减小到 512MB,填充得很好,但仍然收到相同的错误,请参阅:https://pastebin.com/e2TBwvWd
【问题讨论】:
-
看来我也一样。可以解决吗?有解决办法吗?
-
很遗憾,我无法弄清楚这个问题。如果你有任何运气,请告诉我!
标签: python python-3.x tensorflow machine-learning object-detection