jingyuanli001 / RFR-Inpainting

The source code for CVPR 2020 accepted paper "Recurrent Feature Reasoning for Image Inpainting"
MIT License
355 stars 76 forks source link

Training stops immediately #44

Closed Cristy94 closed 3 years ago

Cristy94 commented 3 years ago

If I try to train the model, training starts and then the script immediately exists with no error message.

> python run.py --data_root data_train/images --mask_root data_train/masks --model_path checkpoints/checkpoint_celeba.pth --target_size 256 --mask_mode 1 --batch_size 6 --gpu 0
Model Initialized, iter:  600000
Model moved to cuda
Starting training from iteration:600000

There is a new file checkpoint/g_final.pth, but apart from that nothing seems to happen and the script exits.

Cristy94 commented 3 years ago

Nevermind, I found the issue. The pretrained model already has 600k iterations, but the default num_iters is 450k, so it thinks training is finished.

The solution is to pass a higher num_iters, like --num_iters 700000.