autonomousvision / projected-gan

[NeurIPS'21] Projected GANs Converge Faster
MIT License
884 stars 96 forks source link

An error occurred evaluating the loaded PKL file #95

Open 49xxy opened 1 year ago

49xxy commented 1 year ago

Thank you for your excellent work. I encountered the following errors when evaluating pkl model with FID and KID: Loading network from "training-runs/00003-fastgan_lite-lianpu7k-gpus1-batch8/best_model.pkl"... Traceback (most recent call last): File "calc_metrics.py", line 186, in <module> calc_metrics() # pylint: disable=no-value-for-parameter File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1130, in __call__ return self.main(*args, **kwargs) File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1055, in main rv = self.invoke(ctx) File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1404, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 760, in invoke return __callback(*args, **kwargs) File "/usr/local/lib/python3.8/dist-packages/click/decorators.py", line 26, in new_func return f(get_current_context(), *args, **kwargs) File "calc_metrics.py", line 144, in calc_metrics network_dict = legacy.load_network_pkl(f) File "/workspace/projected_gan-main/legacy.py", line 24, in load_network_pkl data = _LegacyUnpickler(f).load() File "/workspace/projected_gan-main/legacy.py", line 72, in find_class return super().find_class(module, name) ModuleNotFoundError: No module named '__builtin__'

I sincerely hope to get your help.Thanks!

woctezuma commented 1 year ago

Requirement:

anaivebird commented 1 year ago

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