Multiplication returning inf in Python

189 Views Asked by At

My below function call is returning tensor of infs.

def regression(my_x, my_m, my_b):
    return my_m*my_x + my_b

my_x is a Pytorch tensor. I think it is returning inf as it is crossing limit of float . how can I instruct multiplication operator to use bigger data type like float128 or Decimal?

0

There are 0 best solutions below