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

预训练时报错 #33

Closed
zhaoxueyi6 opened this issue May 14, 2024 · 4 comments
Closed

预训练时报错 #33

zhaoxueyi6 opened this issue May 14, 2024 · 4 comments

Comments

@zhaoxueyi6
Copy link

预训练时报错,网上找不到相关的问题,可否给点提示

Traceback (most recent call last):
File "/home/zxy/exp/DFMGAN-main/train.py", line 645, in
main() # pylint: disable=no-value-for-parameter
File "/home/zxy/anaconda3/envs/dftgan/lib/python3.9/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
File "/home/zxy/anaconda3/envs/dftgan/lib/python3.9/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/home/zxy/anaconda3/envs/dftgan/lib/python3.9/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/zxy/anaconda3/envs/dftgan/lib/python3.9/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/home/zxy/anaconda3/envs/dftgan/lib/python3.9/site-packages/click/decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/zxy/exp/DFMGAN-main/train.py", line 638, in main
subprocess_fn(rank=0, args=args, temp_dir=temp_dir)
File "/home/zxy/exp/DFMGAN-main/train.py", line 473, in subprocess_fn
training_loop.training_loop(rank=rank, **args)
File "/home/zxy/exp/DFMGAN-main/training/training_loop.py", line 532, in training_loop
result_dict = metric_main.calc_metric(metric=metric, G=snapshot_data['G_ema'],
File "/home/zxy/exp/DFMGAN-main/metrics/metric_main.py", line 46, in calc_metric
results = _metric_dictmetric
File "/home/zxy/exp/DFMGAN-main/metrics/metric_main.py", line 86, in fid50k_full
fid = frechet_inception_distance.compute_fid(opts, max_real=None, num_gen=50000)
File "/home/zxy/exp/DFMGAN-main/metrics/frechet_inception_distance.py", line 29, in compute_fid
mu_gen, sigma_gen = metric_utils.compute_feature_stats_for_generator(
File "/home/zxy/exp/DFMGAN-main/metrics/metric_utils.py", line 280, in compute_feature_stats_for_generator
features = detector(images, **detector_kwargs)
File "/home/zxy/anaconda3/envs/dftgan/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
RuntimeError: MALFORMED INPUT: lanes dont match

@Ldhlwh
Copy link
Owner

Ldhlwh commented May 18, 2024

这两个issue或许有帮助
NVlabs/stylegan3#20
pytorch/pytorch#64062

@zhaoxueyi6
Copy link
Author

感谢!我跳过了metrics,还有一个问题,在Transfer的部分报错Traceback (most recent call last):
File "/home/zxy/exp/DFMGAN-main/train.py", line 645, in
main() # pylint: disable=no-value-for-parameter
File "/home/zxy/anaconda3/envs/dftgan/lib/python3.9/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
File "/home/zxy/anaconda3/envs/dftgan/lib/python3.9/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/home/zxy/anaconda3/envs/dftgan/lib/python3.9/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/zxy/anaconda3/envs/dftgan/lib/python3.9/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/home/zxy/anaconda3/envs/dftgan/lib/python3.9/site-packages/click/decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/zxy/exp/DFMGAN-main/train.py", line 638, in main
subprocess_fn(rank=0, args=args, temp_dir=temp_dir)
File "/home/zxy/exp/DFMGAN-main/train.py", line 473, in subprocess_fn
training_loop.training_loop(rank=rank, **args)
File "/home/zxy/exp/DFMGAN-main/training/training_loop.py", line 169, in training_loop
resume_data = legacy.load_network_pkl(f)
File "/home/zxy/exp/DFMGAN-main/legacy.py", line 21, in load_network_pkl
data = _LegacyUnpickler(f).load()
_pickle.UnpicklingError: invalid load key, '\xcf',我试了重新下载pkl文件也不行,我想是不是pickle版本的问题,可否问一下您的pickle版本

@Ldhlwh
Copy link
Owner

Ldhlwh commented May 29, 2024

我用的是python 3.8.12自带的pickle

@zhaoxueyi6
Copy link
Author

zhaoxueyi6 commented May 31, 2024 via email

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