Sadam1195
(Sadam Hussain Memon)
June 11, 2020, 4:29pm
1
Hi, I succeessfully trained my model using
train.py --config_path config.json
Now I have more data so I want to continue where I left and start training with the new data. Would it be right if I do
train.py --config_path config.json --restore_path /path/to/your/model.pth.tar
that.
Is that enough for continues learning or am I wrong.
Also when I tried to do the same with
CUDA_VISIBLE_DEVICES=“0,1,2,3” distribute.py --config_path config.json --restore_path /path/to/your/model.pth.tar
It failed. Can you suggest what might be wrong there.
Thanks.
Sadam1195
(Sadam Hussain Memon)
June 18, 2020, 10:01am
2
@erogol can you help me out here?
erogol
(Egolge)
June 18, 2020, 10:11am
3
you can use --continue_path by changing the config file of your pretrained model to include your new dataset. Or you can use --restore_path. So both would work fine.
Sadam1195
(Sadam Hussain Memon)
June 18, 2020, 10:21am
4
I did, it worked fine with train.py but it gave error while using distribute.py. Any particular reasons?
erogol
(Egolge)
June 18, 2020, 10:22am
5
without knowing the error there is no reason
Sadam1195
(Sadam Hussain Memon)
June 18, 2020, 10:24am
6
I don’t have the logs right now but I’ll post again when I get the error.
Sadam1195
(Sadam Hussain Memon)
June 18, 2020, 10:37am
7
What is the difference between these two?
–continue_path
–restore_path
CUDA_VISIBLE_DEVICES=“0,1,2,3” distribute.py --config_path config.json --restore_path /path/to/your/model.pth.tar
VS
CUDA_VISIBLE_DEVICES=“0,1,2,3” distribute.py --config_path config.json --continue_path /path/to/your/model.pth.tar`
Do they produce different results?
Use train.py -h for help
–continue_path will just continue your training with the same config in the same folder.
With --restore_path you can finetune a model with a different config, so --config_path is require with --restore_path. It will also create a new training folder.
2 Likes