Is there the Pi greek (3.1415...) defined somewhere?

as in title. Is it defined?

I need this value in order to implement a custom loss function. Right now I am using:


Thank you!


You have it in the python math library. But we don’t have a special one in pytorch, you will need to create a tensor with it.

import math
1 Like