Source code of torch.logsumexp

Hi,

In my implementation, I need logsumexp to stabilize the computation. It works well in high dimension. But it seems like I still encounter numerical issues (nan) in 1-dimensional experiments.

However, I couldn’t find the source code for this function. How is it implemented? Thanks!

This should be the current implementation.

1 Like