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

It seems to be a problem with the given pre-trained model file? #111

Open
sheldonana opened this issue Nov 4, 2024 · 0 comments
Open

It seems to be a problem with the given pre-trained model file? #111

sheldonana opened this issue Nov 4, 2024 · 0 comments

Comments

@sheldonana
Copy link

When I try to import the pre-trained model provided by you in the form of ffhq.pkl file and run the gen_images.py file,I get the following error message:
Traceback (most recent call last):
File "/home/liangjianan/project/projected_gan/gen_images.py", line 145, in
generate_images() # pylint: disable=no-value-for-parameter
File "/home/liangjianan/.conda/envs/MIA/lib/python3.10/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
File "/home/liangjianan/.conda/envs/MIA/lib/python3.10/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/home/liangjianan/.conda/envs/MIA/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/liangjianan/.conda/envs/MIA/lib/python3.10/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/home/liangjianan/project/projected_gan/gen_images.py", line 137, in generate_images
img = G(z, label)
File "/home/liangjianan/.conda/envs/MIA/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/home/liangjianan/project/projected_gan/pg_modules/networks_fastgan.py", line 177, in forward
img = self.synthesis(w, c)
File "/home/liangjianan/.conda/envs/MIA/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/home/liangjianan/project/projected_gan/pg_modules/networks_fastgan.py", line 63, in forward
feat_8 = self.feat_8(feat_4)
File "/home/liangjianan/.conda/envs/MIA/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/home/liangjianan/.conda/envs/MIA/lib/python3.10/site-packages/torch/nn/modules/container.py", line 217, in forward
input = module(input)
File "/home/liangjianan/.conda/envs/MIA/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/home/liangjianan/.conda/envs/MIA/lib/python3.10/site-packages/torch/nn/modules/upsampling.py", line 157, in forward
recompute_scale_factor=self.recompute_scale_factor)
File "/home/liangjianan/.conda/envs/MIA/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1614, in getattr
raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'Upsample' object has no attribute 'recompute_scale_factor'

It seems to be a problem with the given pre-trained model file?

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