hengruo / QANet-pytorch

A PyTorch implementation of QANet.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Position Encoding

InitialBug opened this issue · comments

In the original paper 《attention is all you need》, it seems the position encoding is direct computed rather than trained. But in your code, the final parameter is wrapped with torch.nn.Parameter, is that OK?

@InitialBug You are right. I should set requires_grad=False. Thanks!