Re-training SSD-Mobilenet "EOFError: Ran out of input"

Hi guys, while trying to re-train my model I ran into this error which I am clueless how to fix. The file mobilenet-v1-ssd-mp-0_675.pth seems to be the problem, even when I downloaded it many times as follow:

$ cd jetson-inference/python/training/detection/ssd
$ wget -O models/mobilenet-v1-ssd-mp-0_675.pth
$ pip3 install -v -r requirements.txt

Nonetheless, the error does not go away by doing it and changing the number of workers. Any hint would be much appreciated!

The error:

martin@Jetsonnano:~/Downloads/jetson-inference/python/training/detection/ssd$ python3 --dataset-type=voc --data=data/pokemons --model-dir=models/pokemons --batch-size=2 --num-workers=0 --epochs=1
2022-03-04 08:27:18 - Using CUDA…
2022-03-04 08:27:18 - Namespace(balance_data=False, base_net=None, base_net_lr=0.001, batch_size=2, checkpoint_folder=‘models/pokemons’, dataset_type=‘voc’, datasets=[‘data/pokemons’], debug_steps=10, extra_layers_lr=None, freeze_base_net=False, freeze_net=False, gamma=0.1, lr=0.01, mb2_width_mult=1.0, milestones=‘80,100’, momentum=0.9, net=‘mb1-ssd’, num_epochs=1, num_workers=0, pretrained_ssd=‘models/mobilenet-v1-ssd-mp-0_675.pth’, resume=None, scheduler=‘cosine’, t_max=100, use_cuda=True, validation_epochs=1, weight_decay=0.0005)
2022-03-04 08:27:18 - Prepare training datasets.
2022-03-04 08:27:18 - VOC Labels read from file: (‘BACKGROUND’, ‘pikachu’, ‘charmander’)
2022-03-04 08:27:18 - Stored labels into file models/pokemons/labels.txt.
2022-03-04 08:27:18 - Train dataset size: 460
2022-03-04 08:27:18 - Prepare Validation datasets.
2022-03-04 08:27:19 - VOC Labels read from file: (‘BACKGROUND’, ‘pikachu’, ‘charmander’)
2022-03-04 08:27:19 - Validation dataset size: 460
2022-03-04 08:27:19 - Build network.
2022-03-04 08:27:19 - Init from pretrained ssd models/mobilenet-v1-ssd-mp-0_675.pth
Traceback (most recent call last):
File “”, line 309, in
File “/home/martin/Downloads/jetson-inference/python/training/detection/ssd/vision/ssd/”, line 119, in init_from_pretrained_ssd
state_dict = torch.load(model, map_location=lambda storage, loc: storage)
File “/home/martin/.local/lib/python3.6/site-packages/torch/”, line 585, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File “/home/martin/.local/lib/python3.6/site-packages/torch/”, line 755, in _legacy_load
magic_number = pickle_module.load(f, **pickle_load_args)
EOFError: Ran out of input

Thanks a lot!

Hi @mnabaes, it seems your connection is having trouble downloading from, as I was just able to download this file ok and use it. Can you try running the following instead:

wget -P models

Please keep follow-up about this particular issue in this thread as opposed to creating a new topic each time - thanks!

1 Like

Thanks a lot mate! It worked out just fine. It turned out the file I was downloading from the was corrupted.

Much appreciated Dusty!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.