DySAT_pytorch icon indicating copy to clipboard operation
DySAT_pytorch copied to clipboard

error

Open zhaohaixiangbobo opened this issue 3 years ago • 2 comments

sometimes it runs this error image

but sometimes it not

zhaohaixiangbobo avatar Dec 22 '21 10:12 zhaohaixiangbobo

sometimes it runs this error image

but sometimes it not

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.

FeiGSSS avatar Dec 22 '21 11:12 FeiGSSS

sometimes it runs this error image but sometimes it not

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 image image 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吧

zhaohaixiangbobo avatar Dec 22 '21 12:12 zhaohaixiangbobo