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

To test the model #109

Open
wxthu opened this issue Dec 17, 2020 · 4 comments
Open

To test the model #109

wxthu opened this issue Dec 17, 2020 · 4 comments

Comments

@wxthu
Copy link

wxthu commented Dec 17, 2020

Hi, when I finished the task of training model using customized datasets and tested with command "python generate.py checkpoint/010000.model", I encountered the error as following:

""""
generator.load_state_dict(torch.load(args.path)['g_running'])

KeyError: "g_running"
""""
I cannot understand. Could you please give me a help ? Thx

@rosinality
Copy link
Owner

You need to use just generator.load_state_dict(torch.load(args.path)). I don't remember why I have used different checkpoint structures.

@wxthu
Copy link
Author

wxthu commented Dec 18, 2020

Thanks for your reply and when I run "python train.py --mixing --loss r1 --sched LMDB_PATH" using my customized datasets, no checkpoints generated and I am confused. (ps: I am newcomer for this field)

@wxthu
Copy link
Author

wxthu commented Dec 18, 2020

Also, I wanna know how to accelerate the training process in the command line ? It seems so slow....

@rosinality
Copy link
Owner

Checkpoints should have been saved at every 10,000 iterations or phase (resolution) changes.

And as this implementation uses nn.DataParallel for multi gpu training so it is not very efficient. You may need to consider the implementations that uses nn.parallel.DistributedDataParallel.

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

2 participants