bdusell / semiring-einsum

Generic PyTorch implementation of einsum that supports different semirings
https://bdusell.github.io/semiring-einsum/
MIT License
44 stars 8 forks source link

log_einsum returns nan instead of inf #13

Closed davidweichiang closed 1 year ago

davidweichiang commented 2 years ago
log_einsum(s.compile_equation(',->'), torch.tensor(2e38), torch.tensor(2e38), block_size=1)

Expected output: torch.tensor(inf)

Actual output: torch.tensor(nan)