Open YongWookHa opened 4 years ago
https://github.com/luopeixiang/im2latex/blob/cd80800b70621847315e09fc9b760b5281f1a9f7/model/position_embedding.py#L43
I found your code little bit strange. I think this code should have been changed like below.
sinusoid[:,::2] = torch.sin(scaled_time) sinusoid[:,1::2] = torch.cos(scaled_time)
Do I misunderstand your code?
https://github.com/luopeixiang/im2latex/blob/cd80800b70621847315e09fc9b760b5281f1a9f7/model/position_embedding.py#L43
I found your code little bit strange. I think this code should have been changed like below.
Do I misunderstand your code?