-
Notifications
You must be signed in to change notification settings - Fork 7
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
Reshaping issue #4
Comments
A possible fix: |
Hi, Thanks for pointing out the mistake. It was fixed when the repo was merged to asteroid here, somehow it was not fixed here. But I did not see any significant improvement in terms of overfitting unfortunately. |
Thanks for the quick response @vitrioil ! It seems another similar bug is repeated here and also in the asteroid. Here, we are reshaping (N,298,2x257xself.num_person) into (N,2,298,257,self.num_person). Instead of view(N, 2, 298, 257, self.num_person), it will be more appropriate to do view(N,298,2,257,self.num_person).transpose(1,2). |
I see... we are mixing the axis at the last layer. Thank you again for pointing this out! I will fix this. |
please let know if you manage to overcome the overfitting problem with this fix. thanks! |
Here input channel expected by |
Hi, |
Hi @MordehayM, |
Hi,

When you do this op
You are commiting a mistake.
You are doing
input.view(B, -1, 298, 1)
and that is not correct.In pytorch the reshaping op is ordered from right to left.
You have to do a permutation
permute(0,2,1,3)
and then the reshaping
view(B,298,-1)
Basically this way the values
[0,0,0,0:257]-->[0,0,0:257]
[0,0,0,1:257]-->[0,0,257:257*2]
and so on.
Whay you are doing is mixing the data
You are putting
(B,8,298,257)
[0,0,0,0:257] --> [0,0,0:257]
[0,0,1,0:257] --> [0,0,257:298], then [0,1,0:298-257] and filling the reshaped tensor in a bad way
The text was updated successfully, but these errors were encountered: