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

Is flattening_layer correct ? #13

Open
chrisM38 opened this issue Oct 22, 2021 · 0 comments
Open

Is flattening_layer correct ? #13

chrisM38 opened this issue Oct 22, 2021 · 0 comments

Comments

@chrisM38
Copy link

I have a question. I was trying to train the colorization_cINN, but I have some struggles with the fully connected section. I keep getting an error in the glow_coupling_layer:

File "...\FrEIA\modules\coupling_layers.py", line 179, in forward
    r2 = self.s2(torch.cat([x2, *c], 1) if self.conditional else x2)
RuntimeError: Tensors must have same number of dimensions: got 1 and 2

X2 keeps having 2 Dimensions, even after applying the flattening_layer. The output_shape is giving you the correct format.

x = torch.rand((1, 32, 4, 4))

module = flattening_layer ([x.size()])
print(module.output_shape)   ## (512,)
print(module.forward([x])[0].size()) ## torch.Size([1, 512])

Am I doing something wrong there ?
Thanks in advance!

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