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

checkpoint of SLEGAN models #289

Open
emanuelebalia opened this issue Jan 19, 2022 · 4 comments
Open

checkpoint of SLEGAN models #289

emanuelebalia opened this issue Jan 19, 2022 · 4 comments

Comments

@emanuelebalia
Copy link

Is implemented the way to save the chekpoints of the models in SLEGAN? The train.py need a --model-load-path but dont work with the GenIter.h5 file generated. There is a solution?

@TE-andrewshin
Copy link
Contributor

TE-andrewshin commented Jan 20, 2022

If you run train.py all the way through, then it will save the checkpoints by default. I'm not sure why model-load-path is not working in your second question. Could you post the error message here? (By the way, train.py doesn't need to have --model-load-path argument. It'll just run from scratch if --model-load-path is not specified)

@emanuelebalia
Copy link
Author

Which are the checkpoint file and how I load its on the train.py? In general, there is no error, but the train start from scratch each time, even if I set some model-load-path

@TE-andrewshin
Copy link
Contributor

TE-andrewshin commented Jan 20, 2022

I see. It actually looks like train.py is missing a part for loading checkpoints. We will update it asap.

In the mean time, you can do the following:
Add the following lines after Line 68 of train.py,

    gen_param_path = args.model_load_path + "/Gen_xxx.h5"
    dis_param_path = args.model_load_path + "/Dis_xxx.h5"
    with nn.parameter_scope(scope_gen):
        nn.load_parameters(gen_param_path)
    with nn.parameter_scope(scope_dis):
        nn.load_parameters(dis_param_path)

@emanuelebalia
Copy link
Author

okok, I'll add it, thanks.

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