training the code with pretrained weights
xianrui-luo opened this issue · 7 comments
xianrui-luo commented
Hi, I would like to ask about how to load the pretrained weights and start training without interfering other process?
codeslake commented
Hi, are you trying to resume training? or to start the training with pretrained weights with a new learning rate scheduling?
xianrui-luo commented
start the training with pretrained weights with a new learning rate scheduling
codeslake commented
I see. The current code does not provide the functionality at the moment. I will spend some of my time adding the functionality.
Do your pretrained weights include weights for the reblurring network also?
xianrui-luo commented
codeslake commented
Hi, I've just pushed some commits. Pull the repo and try the following command:
- Use a
mode
name different from themode
name of the pretrained model to prevent the process from overriding the folder of the pretrained model. - Give absolute path of the pretrained weights to
-ra
or--resume_absolute
option. - The learning rate scheduleling will start from the beginning following the config file given with the
--config
option.
CUDA_VISIBLE_DEVICES=0,1,2,3 python -B -m torch.distributed.launch --nproc_per_node=4 --master_port=9000 run.py \
--is_train \
--mode IFAN_finetune \
--config config_IFAN \
--trainer trainer \
--network IFAN \
-b 2 \
-th 8 \
-ra /path/to/the/pretriained/weights \
-ss \
-dist
xianrui-luo commented
Thank you for your help! I will try it now.
makeyyp commented