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

Dimension problem #15

Open
JayTheFreeman opened this issue Apr 28, 2024 · 0 comments
Open

Dimension problem #15

JayTheFreeman opened this issue Apr 28, 2024 · 0 comments

Comments

@JayTheFreeman
Copy link

Dear gdlg, Wishing you all the best lately.
Thank you very much for sharing the CBP codes. The time I was trying to test them, I found an interesting result. My test codes are shown as follows:
import torch
from compact_bilinear_pooling import CountSketch, CompactBilinearPooling

input_size = 3
output_size = 3
mcb = CompactBilinearPooling(input_size, input_size, output_size).cuda()
x = torch.rand(4,32,32,3).cuda()
y = torch.rand(4,32,32,3).cuda()

z = mcb(x,y)
As you had answered in another issues named "Merge",we should make sure the channel dimension be put in the last dimension of tensor, I had follow this advise in the code. With the codes above, I expected to get the output z with dimension (4, 32, 32, 3), however, the actual output dimension of z is (4, 3, 32, 2). I have been confused about this problem for a while.
It would be very kind of you to take some time out of your busy schedule to discuss this issue with me.

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