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

Wrong dimension on gather #1897

Open
danielgordon10 opened this issue Oct 15, 2024 · 0 comments
Open

Wrong dimension on gather #1897

danielgordon10 opened this issue Oct 15, 2024 · 0 comments

Comments

@danielgordon10
Copy link

.view(N, K, H_out, W_out)

I noticed when running a render with multiple textures and faces_per_pixel > 1 that I was getting the result. I traced the issue to this line.
pix_to_face has shape (N, image_size, image_size, faces_per_pixel) you can check your docs to confirm this. However the view call here orders it to (N, faces_per_pixel, image_size, image_size) which ends up mis-indexing lower down.

One obvious way to fix this is to change .view to .view(N, H_out, W_out, K).permute(0, 3, 1, 2). I have tested this and confirmed it gives appropriate results.

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