lucidrains / meshgpt-pytorch

Implementation of MeshGPT, SOTA Mesh generation using Attention, in Pytorch
MIT License
744 stars 59 forks source link

Issue with Multiple `eos_token_id` in Code Sequences #26

Closed qixuema closed 10 months ago

qixuema commented 10 months ago

Hi, Phil,

I've noticed a potential issue in the code where multiple eos_token_id are being added to the code sequences, instead of just one at the end of each row. It seems to insert four eos_token_id values. Could you please clarify if this is the expected behavior?

batch_arange = torch.arange(batch, device = device)
batch_arange = rearrange(batch_arange, '... -> ... 1')

codes[batch_arange, code_lens] = self.eos_token_id

Best regards, Xueqi

lucidrains commented 10 months ago

@qixuema yes indeed there was an issue of a missing dimension

thank you Xueqi!