torch.get_default_dtype¶
- torch.get_default_dtype() torch.dtype ¶
取得目前的預設浮點數
torch.dtype
。範例
>>> torch.get_default_dtype() # initial default for floating point is torch.float32 torch.float32 >>> torch.set_default_dtype(torch.float64) >>> torch.get_default_dtype() # default is now changed to torch.float64 torch.float64