Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does continue_train option work? #33

Closed
hiepph opened this issue May 18, 2017 · 2 comments
Closed

Does continue_train option work? #33

hiepph opened this issue May 18, 2017 · 2 comments

Comments

@hiepph
Copy link

hiepph commented May 18, 2017

I trained edges2shoes dataset with following command:

python train.py --dataroot ./datasets/edges2shoes --name edges2shoes_pix2pix --model pix2pix --which_model_netG unet_256 --which_direction AtoB --lambda_A 100 --align_data --use_dropout --no_lsgan --batchSize 12 --niter 15 --niter_decay 15 

Then after 1 epoch (and it's already saved its own checkpoint), I interrupt with Ctrl+C. The day after, I want to continue training with following command:

python train.py --dataroot ./datasets/edges2shoes --name edges2shoes_pix2pix --model pix2pix --which_model_netG unet_256 --which_direction AtoB --lambda_A 100 --align_data --use_dropout --no_lsgan --batchSize 12 --niter 15 --niter_decay 15 --continue_train

You can notice I parse in --continue_train option (as I read in options/train_options.py).

I notice that generated fake image is kept, but epoch is reset back to 1, loss is also graphed from nothing.

I wonder if this continued training or not? If not, how can I keep training my model after interrupting it.

@tnako
Copy link

tnako commented May 18, 2017

Work,
some options like epoch/iter count, image size or loss values can be reconfigured, that is why epoch start from 0. It mean "I won't more 100 epoch with lambda_A = 100" for example

And some options like model type or model settings can`t change, if you create pix2pix model, continue to train pix2pix model

@junyanz
Copy link
Owner

junyanz commented Jun 8, 2017

Yeah, epoch/iter count is reset to 0. Otherwise, it should be fine. I used to save the old model somewhere else.

@junyanz junyanz closed this as completed Jun 13, 2017
JiahangLiGary pushed a commit to lanbas/pytorch-CycleGAN-and-pix2pix that referenced this issue Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants