You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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'
The text was updated successfully, but these errors were encountered:
yichuan-huang
changed the title
Set netG as 'unet_256' can
Set netG as 'unet_256' can't work
Aug 21, 2024
yichuan-huang
changed the title
Set netG as 'unet_256' can't work
Setting netG as 'unet_256' can't work
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'
The text was updated successfully, but these errors were encountered: