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

Setting netG as 'unet_256' can't work #183

Open
yichuan-huang opened this issue Aug 21, 2024 · 0 comments
Open

Setting netG as 'unet_256' can't work #183

yichuan-huang opened this issue Aug 21, 2024 · 0 comments

Comments

@yichuan-huang
Copy link

yichuan-huang commented Aug 21, 2024

I want to set the netG to unet_256, but there is an error.
Traceback (most recent call last):
File "/tmp/contrastive-unpaired-translation/train.py", line 43, in
model.data_dependent_initialize(data)
File "/tmp/contrastive-unpaired-translation/models/cut_model.py", line 108, in data_dependent_initialize
self.compute_G_loss().backward() # calculate graidents for G
File "/tmp/contrastive-unpaired-translation/models/cut_model.py", line 185, in compute_G_loss
self.loss_NCE = self.calculate_NCE_loss(self.real_A, self.fake_B)
File "/tmp/contrastive-unpaired-translation/models/cut_model.py", line 200, in calculate_NCE_loss
feat_q = self.netG(tgt, self.nce_layers, encode_only=True)
File "/root/anaconda3/envs/py310/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/root/anaconda3/envs/py310/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
TypeError: UnetGenerator.forward() got an unexpected keyword argument 'encode_only'

@yichuan-huang yichuan-huang changed the title Set netG as 'unet_256' can Set netG as 'unet_256' can't work Aug 21, 2024
@yichuan-huang yichuan-huang changed the title Set netG as 'unet_256' can't work Setting netG as 'unet_256' can't work Aug 21, 2024
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