mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-14 20:57:59 +00:00
Summary: - fix https://github.com/pytorch/pytorch/issues/39991 - Include directly `min`/`max`/`eps`/`tiny` values in repr of `torch.iinfo` & `torch.finfo` for inspection - Use `torch.float16` / `torch.int16` instead of uncorrespond names `Half` / `Short` - The improved repr is shown just like: ``` >>> torch.iinfo(torch.int8) iinfo(type=torch.int8, max=127, min=-128) >>> torch.iinfo(torch.int16) iinfo(type=torch.int16, max=32767, min=-32768) >>> torch.iinfo(torch.int32) iinfo(type=torch.int32, max=2.14748e+09, min=-2.14748e+09) >>> torch.iinfo(torch.int64) iinfo(type=torch.int64, max=9.22337e+18, min=-9.22337e+18) >>> torch.finfo(torch.float16) finfo(type=torch.float16, eps=0.000976563, max=65504, min=-65504, tiny=6.10352e-05) >>> torch.finfo(torch.float32) finfo(type=torch.float32, eps=1.19209e-07, max=3.40282e+38, min=-3.40282e+38, tiny=1.17549e-38) >>> torch.finfo(torch.float64) finfo(type=torch.float64, eps=2.22045e-16, max=1.79769e+308, min=-1.79769e+308, tiny=2.22507e-308) ``` Pull Request resolved: https://github.com/pytorch/pytorch/pull/40488 Differential Revision: D22445301 Pulled By: mruberry fbshipit-source-id: 552af9904c423006084b45d6c4adfb4b5689db54 |
||
|---|---|---|
| .. | ||
| caffe2 | ||
| cpp | ||
| source | ||
| .gitignore | ||
| libtorch.rst | ||
| make.bat | ||
| Makefile | ||
| requirements.txt | ||