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

There is a problem with the pre-training weights #93

Open
softalter opened this issue Sep 28, 2022 · 0 comments
Open

There is a problem with the pre-training weights #93

softalter opened this issue Sep 28, 2022 · 0 comments

Comments

@softalter
Copy link

scripts/train.py --dataset_type cars_encode --exp_dir directory --use_w_pool --w_discriminator_lambda 0.1 --progressive_start 20000 --id_lambda 0.5 --val_interval 10000 --start_from_latent_avg --max_steps 200000 --stylegan_size 512 --stylegan_weights a/stylegan2-ffhq-config-f.pt --workers 8 --batch_size 8 --test_batch_size 4 --test_workers 4
{'batch_size': 8,
'board_interval': 50,
'checkpoint_path': None,
'd_reg_every': 16,
'dataset_type': 'cars_encode',
'delta_norm': 2,
'delta_norm_lambda': 0.0002,
'encoder_type': 'Encoder4Editing',
'exp_dir': 'directory',
'id_lambda': 0.5,
'image_interval': 100,
'keep_optimizer': False,
'l2_lambda': 1.0,
'learning_rate': 0.0001,
'lpips_lambda': 0.8,
'lpips_type': 'alex',
'max_steps': 200000,
'optim_name': 'ranger',
'progressive_start': 20000,
'progressive_step_every': 2000,
'progressive_steps': [0,
20000,
22000,
24000,
26000,
28000,
30000,
32000,
34000,
36000,
38000,
40000,
42000,
44000,
46000,
48000],
'r1': 10,
'resume_training_from_ckpt': None,
'save_interval': None,
'save_training_data': False,
'start_from_latent_avg': True,
'stylegan_size': 512,
'stylegan_weights': 'a/stylegan2-ffhq-config-f.pt',
'sub_exp_dir': None,
'test_batch_size': 4,
'test_workers': 4,
'train_decoder': False,
'update_param_list': None,
'use_w_pool': True,
'val_interval': 10000,
'w_discriminator_lambda': 0.1,
'w_discriminator_lr': 2e-05,
'w_pool_size': 50,
'workers': 8}
Loading encoders weights from irse50!
Loading decoder weights from pretrained!
Traceback (most recent call last):
File "/root/test/encoder4editing-main/encoder4editing-main/scripts/train.py", line 87, in
main()
File "/root/test/encoder4editing-main/encoder4editing-main/scripts/train.py", line 28, in main
coach = Coach(opts, previous_train_ckpt)
File "../training/coach.py", line 42, in init
self.lpips_loss = LPIPS(net_type=self.opts.lpips_type).to(self.device).eval()
File "../criteria/lpips/lpips.py", line 23, in init
self.net = get_network(net_type).to("cuda")
File "../criteria/lpips/networks.py", line 14, in get_network
return AlexNet()
File "../criteria/lpips/networks.py", line 81, in init
self.layers = models.alexnet(True).features
File "/root/miniconda3/lib/python3.8/site-packages/torchvision/models/alexnet.py", line 63, in alexnet
state_dict = load_state_dict_from_url(model_urls['alexnet'],
File "/root/miniconda3/lib/python3.8/site-packages/torch/hub.py", line 528, in load_state_dict_from_url
return torch.load(cached_file, map_location=map_location)
File "/root/miniconda3/lib/python3.8/site-packages/torch/serialization.py", line 593, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "/root/miniconda3/lib/python3.8/site-packages/torch/serialization.py", line 762, in _legacy_load
magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: unpickling stack underflow

Process finished with exit code 1

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