Spec-Zone.ru › PyTorch 2.14

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

© 2026, PyTorch Contributors
PyTorch has a BSD-style license, as found in the LICENSE file.
https://docs.pytorch.org/docs/2.14/generated/torch.get_default_dtype.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API