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

A question about the code in 'meshgpt_pytorch.py' #72

Open
LeeYan1 opened this issue Mar 16, 2024 · 0 comments
Open

A question about the code in 'meshgpt_pytorch.py' #72

LeeYan1 opened this issue Mar 16, 2024 · 0 comments

Comments

@LeeYan1
Copy link

LeeYan1 commented Mar 16, 2024

Here is from line 1442 to line 1449 in 'meshgpt_pytorch.py':
`
sos = repeat(self.sos_token, 'd -> b d', b = batch) # b, nf, d

attended_face_codes_with_sos, _ = pack([sos, attended_face_codes], 'b * d') # b, 1+nf, d

grouped_codes = pad_to_length(grouped_codes, attended_face_codes_with_sos.shape[-2], dim = 1) # b, nf+1, n, d
fine_vertex_codes, _ = pack([attended_face_codes_with_sos, grouped_codes], 'b n * d') # b, nf+1, 1+n, d

fine_vertex_codes = fine_vertex_codes[..., :-1, :] # b, nf+1, 1+n-1, d
`
The meanings of the symbols in the comments are b for batch, nf for number of faces, d for the dimension of feature, n for the number of tokens per face respectively. And the number before or after the symbols means that the location where the dimension is added.

If my understanding above is correct, what does the variable fine_vertex_codes mean in line 1447? And after line 1449, did the slice on variable fine_vertex_codes mistakenly remove the features about the current face? In the other words, the slicing operation in line 1449 removes the contents of variable grouped_codes.

Thank the author for providing the code, but also look forward to the author's answer.

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