use fa'3 transv

This commit is contained in:
chenhongmin.will
2025-02-28 14:35:07 +08:00
parent 0337732dc1
commit 061af5fc56
2 changed files with 17 additions and 16 deletions

View File

@@ -33,7 +33,7 @@ def cal_diff(x: torch.Tensor, y: torch.Tensor, name: str) -> None:
cos_diff = 1 - 2 * (x * y).sum().item() / max((x * x + y * y).sum().item(), 1e-12)
amax_diff = (x - y).abs().max().item()
# print(f"{name}: {cos_diff=}, {RMSE=}, {amax_diff=}")
#assert cos_diff < 1e-5
assert cos_diff < 1e-5
@torch.inference_mode()