pfnet-research/sngan_projection

KeyError: 'block2/b1/gammas/W is not a file in the archive'

Closed this issue · 2 comments

When I run this cmd

python evaluations/gen_interpolated_images.py --n_zs=10 --n_int
p=10 --classes 986 989 --config=configs/sn_projection_64.yml --snapshot=pretrained_models/ResNetGeneratorImageNet_250000
.npz --results_dir=result/gen_morphing_images

I got a error KeyError: 'block2/b1/gammas/W is not a file in the archive'
Any ideas, thanks.

@takerum
OK, I finally find I use the wrong model. Because I want use the model trained by ImageNet, so I download the ResNetGeneratorImageNet_250000.npz, for it's name include ImageNet and the comment in gen_interpolated_images.py uses a similar named model as an example:

""" Example: python evaluations/gen_interpolated_images.py --n_zs=10 --n_intp=10 --snapshot=ResNetGeneratorImageNet_850000.npz --config=configs/sn_projection.yml --classes 986 989 """
When I try another model ResNetGenerator_850000.npz , everything works well.
I think it will be less confused if you change the model name in the comment of gen_interpolated_images.py.
Anyway, thanks for sharing the code, it's a great work.

You are right, and thanks for letting me know that. I fixed it.