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

I have some question in gen_image.py #101

Open
wj7486 opened this issue Mar 24, 2023 · 1 comment
Open

I have some question in gen_image.py #101

wj7486 opened this issue Mar 24, 2023 · 1 comment

Comments

@wj7486
Copy link

wj7486 commented Mar 24, 2023

Traceback (most recent call last):
File "gen_images.py", line 143, in
generate_images() # pylint: disable=no-value-for-parameter
File "/home/wangjie/anaconda3/envs/torch18/lib/python3.7/site-packages/click/core.py", line 1128, in call
return self.main(*args, **kwargs)
File "/home/wangjie/anaconda3/envs/torch18/lib/python3.7/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/home/wangjie/anaconda3/envs/torch18/lib/python3.7/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/wangjie/anaconda3/envs/torch18/lib/python3.7/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "gen_images.py", line 108, in generate_images
G = legacy.load_network_pkl(f)['G_ema'].to(device) # type: ignore
File "/home/wangjie/workspace/projected-gan-main/legacy.py", line 24, in load_network_pkl
data = _LegacyUnpickler(f).load()
File "/home/wangjie/workspace/projected-gan-main/legacy.py", line 69, in find_class
return super().find_class(module, name)
ModuleNotFoundError: No module named 'builtin'
(torch18) wangjie@vm02:~/workspace/projected-gan-main$ python gen_images.py --outdir=out --trunc=0.7 --seeds=600-605 --class=99 --network=./training-runs/00000-fastgan-CELEBA500_unlabeledall-gpus4-batch64/best_model.pkl
Loading networks from "./training-runs/00000-fastgan-CELEBA500_unlabeledall-gpus4-batch64/best_model.pkl"...
Traceback (most recent call last):
File "gen_images.py", line 143, in
generate_images() # pylint: disable=no-value-for-parameter
File "/home/wangjie/anaconda3/envs/torch18/lib/python3.7/site-packages/click/core.py", line 1128, in call
return self.main(*args, **kwargs)
File "/home/wangjie/anaconda3/envs/torch18/lib/python3.7/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/home/wangjie/anaconda3/envs/torch18/lib/python3.7/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/wangjie/anaconda3/envs/torch18/lib/python3.7/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "gen_images.py", line 108, in generate_images
G = legacy.load_network_pkl(f)['G_ema'].to(device) # type: ignore
File "/home/wangjie/workspace/projected-gan-main/legacy.py", line 24, in load_network_pkl
data = _LegacyUnpickler(f).load()
File "/home/wangjie/workspace/projected-gan-main/legacy.py", line 72, in find_class
return super().find_class(module, name)
ModuleNotFoundError: No module named 'builtin'

I don't know how to deal.Can you help me

@anaivebird
Copy link

$%Z(6I9Z%0GQ~ 5K @_3H
add this to line 72 of legacy.py

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