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

Possible bug with padding #5

Closed
georgepar opened this issue Mar 16, 2021 · 2 comments
Closed

Possible bug with padding #5

georgepar opened this issue Mar 16, 2021 · 2 comments

Comments

@georgepar
Copy link

georgepar commented Mar 16, 2021

Hey there,

I was going through the code and I noticed the following, which I found curious.

In Line 75, you pad the input tensor to a multiple of num_landmarks from the front:

x = F.pad(x, (0, 0, padding, 0), value = 0)

In Line 144 you trim the extra padding elements you inserted in the output tensor from the end.

out = out[:, :n]

Am I not getting something, or should we be removing the front elements of out?

out = out[:, out.size(1) - n:]
@lucidrains
Copy link
Owner

@georgepar Hi Giorgos! You indeed found a bug, thank you, and I am sorry if this caused any troubles with your research :(

@georgepar
Copy link
Author

No trouble at all. Thanks for your awesome work :)

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

2 participants