Skip to content

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

@LeeYan1

Description

@LeeYan1

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions