Error(s) in loading state_dict for DataParallel in generating_samples.py
- Lenguaje dominante
- Python
- Estrellas
- 625
- Forks
- 103
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
After a whole training with
$ python3 sourcecode/train.py --depth=7 --latent_size=256 --images_dir=DATASET --sample_dir=sampledir/exp2 --model_dir=modeldir/exp2
when launching
$ python3 sourcecode/generate_samples.py --generator_file=modeldir/exp2/GAN_GEN_100.pth --depth=7 --out_dir=outputdir
I got:
''
Creating generator object ...
Loading the generator weights from: modeldir/exp2/GAN_GEN_100.pth
Traceback (most recent call last):
File "sourcecode/generate_samples.py", line 134, in
main(parse_arguments())
File "sourcecode/generate_samples.py", line 105, in main
gen.load_state_dict(
File "~/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for DataParallel:
Missing key(s) in state_dict: "module.layers.7.conv_1.weight", "module.layers.7.conv_1.bias", "module.layers.7.conv_2.weight", "module.layers.7.conv_2.bias", "module.layers.8.conv_1.weight", "module.layers.8.conv_1.bias", "module.layers.8.conv_2.weight", "module.layers.8.conv_2.bias", "module.rgb_converters.7.weight", "module.rgb_converters.7.bias", "module.rgb_converters.8.weight", "module.rgb_converters.8.bias".
''
Both training and generation are executed on the same machine with multiple GPUs enabled and ready.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.