Floating point precision in libtorch

Hi,

I would like to get more accurate value when printing a tensor.
I know that in python you can do something like that:

torch.set_printoptions(precision=10)

Do you know about something similar in libtorch?
Thank you.

1 Like

Stuck at this, too.

Have you found a way to print with higher precision?

not really, I just convert the tensor into array and than printed the array values.

This is still an issue.
The print behavior is really bad with double type numbers:
Screenshot from 2021-06-10 15-12-22