Your mask is wrong. Try scores = scores.masked_fill(scores == 0, -np.inf). scores now looks like tensor([[1.4796, 1.2361, 1.2137, 0.9487, ...
確定! 回上一頁