当前位置:网站首页>torch. Finfo function

torch. Finfo function

2022-06-12 20:55:00 Human high quality Algorithm Engineer

torch.finfo
torch.finfo It's an object , It represents floating point torch.dtype The number property of . This is similar to
numpy.finfo,torch.float32,torch.float64,torch.float16.

A torch.finfo provides the following attributes:

	# The return value is after the number 
    max_neg_value0 = torch.finfo(torch.float16).tiny #6.103515625e-05
    max_neg_value1 = torch.finfo(torch.float16).max  #65504.0
    max_neg_value2 = torch.finfo(torch.float32).max  #3.4028234663852886e+38
    max_neg_value3 = torch.finfo(torch.float64).max  #1.7976931348623157e+308

 Insert picture description here
 Insert picture description here

原网站

版权声明
本文为[Human high quality Algorithm Engineer]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202281434270901.html