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

error in line 778, networks.py #7

Closed
wzmsltw opened this issue Aug 11, 2021 · 1 comment
Closed

error in line 778, networks.py #7

wzmsltw opened this issue Aug 11, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@wzmsltw
Copy link

wzmsltw commented Aug 11, 2021

Hi junleen

I tried to run the training code, but occur an error in

feat_l, feat_g = torch.cat([xf, xb])

File "/ssd3/vis/lintianwei/project/harmonization/RainNet-main/models/networks.py", line 778, in forward
feat_l, feat_g = torch.cat([xf, xb])
ValueError: too many values to unpack (expected 2)

Actually, feat_l and feat_g are not used during training. Is this a bug?

@junleen
Copy link
Owner

junleen commented Aug 11, 2021

Sorry to make some unexpected changes. Please change the code to:

def forward(self, input, mask=None, gp=False, feat_loss=False):

        x, xf, xb = self.D(input, mask)
        feat_l, feat_g = torch.cat([xf, xb]), x

@junleen junleen added the bug Something isn't working label Aug 11, 2021
@junleen junleen closed this as completed Aug 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants