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 https://nvidia.box.com/shared/static/djf5w54rjvpqocsiztzaandq1m3avr7c.pth -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 train_ssd.py --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 “train_ssd.py”, line 309, in
net.init_from_pretrained_ssd(args.pretrained_ssd)
File “/home/martin/Downloads/jetson-inference/python/training/detection/ssd/vision/ssd/ssd.py”, 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/serialization.py”, 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/serialization.py”, line 755, in _legacy_load
magic_number = pickle_module.load(f, **pickle_load_args)
EOFError: Ran out of input
Thanks a lot!