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

Why Loop Train error??? #97

Open
davidzj0718 opened this issue Aug 6, 2021 · 2 comments
Open

Why Loop Train error??? #97

davidzj0718 opened this issue Aug 6, 2021 · 2 comments

Comments

@davidzj0718
Copy link

Run command:

!lightweight_gan --data='/content/my_data/1024' --image-size=1024 --batch-size=16 --gradient-accumulate-every=4 --network-capacity=16 --num-train-steps=200000 --results_dir='/content/drive/MyDrive/light-result' --models_dir='/content/drive/MyDrive/light-model'

Run Error info:

continuing from previous epoch - 58
loading from version 0.20.3
unable to load save model. please try downgrading the package to the version specified by the saved model
Traceback (most recent call last):
File "/usr/local/bin/lightweight_gan", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.7/dist-packages/lightweight_gan/cli.py", line 190, in main
fire.Fire(train_from_folder)
File "/usr/local/lib/python3.7/dist-packages/fire/core.py", line 141, in Fire
component_trace = _Fire(component, args, parsed_flag_args, context, name)
File "/usr/local/lib/python3.7/dist-packages/fire/core.py", line 471, in _Fire
target=component.name)
File "/usr/local/lib/python3.7/dist-packages/fire/core.py", line 681, in _CallAndUpdateTrace
component = fn(*varargs, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/lightweight_gan/cli.py", line 181, in train_from_folder
run_training(0, 1, model_args, data, load_from, new, num_train_steps, name, seed)
File "/usr/local/lib/python3.7/dist-packages/lightweight_gan/cli.py", line 59, in run_training
model.load(load_from)
File "/usr/local/lib/python3.7/dist-packages/lightweight_gan/lightweight_gan.py", line 1471, in load
raise e
File "/usr/local/lib/python3.7/dist-packages/lightweight_gan/lightweight_gan.py", line 1468, in load
self.GAN.load_state_dict(load_data['GAN'])
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1407, in load_state_dict
self.class.name, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for LightweightGAN:
Missing key(s) in state_dict: "G.layers.3.2.norm.g", "G.layers.3.2.norm.b", "D.residual_layers.3.1.norm.g", "D.residual_layers.3.1.norm.b", "D.to_shape_disc_out.1.fn.norm.g", "D.to_shape_disc_out.1.fn.norm.b", "D.to_shape_disc_out.3.fn.norm.g", "D.to_shape_disc_out.3.fn.norm.b", "GE.layers.3.2.norm.g", "GE.layers.3.2.norm.b", "D_aug.D.residual_layers.3.1.norm.g", "D_aug.D.residual_layers.3.1.norm.b", "D_aug.D.to_shape_disc_out.1.fn.norm.g", "D_aug.D.to_shape_disc_out.1.fn.norm.b", "D_aug.D.to_shape_disc_out.3.fn.norm.g", "D_aug.D.to_shape_disc_out.3.fn.norm.b".
Unexpected key(s) in state_dict: "G.layers.3.2.norm.weight", "G.layers.3.2.norm.bias", "D.residual_layers.3.1.norm.weight", "D.residual_layers.3.1.norm.bias", "D.to_shape_disc_out.1.fn.norm.weight", "D.to_shape_disc_out.1.fn.norm.bias", "D.to_shape_disc_out.3.fn.norm.weight", "D.to_shape_disc_out.3.fn.norm.bias", "GE.layers.3.2.norm.weight", "GE.layers.3.2.norm.bias", "D_aug.D.residual_layers.3.1.norm.weight", "D_aug.D.residual_layers.3.1.norm.bias", "D_aug.D.to_shape_disc_out.1.fn.norm.weight", "D_aug.D.to_shape_disc_out.1.fn.norm.bias", "D_aug.D.to_shape_disc_out.3.fn.norm.weight", "D_aug.D.to_shape_disc_out.3.fn.norm.bias".

@davidzj0718
Copy link
Author

continuing from previous epoch - 58.

@davidzj0718
Copy link
Author

continuing from previous epoch - 58. OK

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

1 participant