The mathematical trick in self-attention, why it returns false for torch.allclose(xbow, xbow2)?
Ryan-ZL-Lin opened this issue · comments
Ryan commented
Arwa commented
@Ryan-ZL-Lin You can adjust the relative tolerance for less strict comparison. the default value is 1e-05 in PyTorch 2.2
This snippet will output True
torch.allclose(xbow, xbow2, rtol= 1e-04) # default 1e-05