error
Opened this issue · 2 comments
zhaohaixiangbobo commented
FeiGSSS commented
zhaohaixiangbobo commented
It seems like something is wrong with the data input. I'd suggest you print the outputs of the model's prediction and check whether the shapes and the values are valid.
If this turns out to be caused by a bug, welcome to submit a PR.
一个没想到的bug
nn.Parameter(torch.Tensor(1, n_heads, self.out_dim))生成的时候就是nan,属实第一次见
建议还是用
self.att_l = nn.Parameter(torch.zeros(1, n_heads, self.out_dim))
self.att_r = nn.Parameter(torch.zeros(1, n_heads, self.out_dim))
或者
randn/rand吧