nessai.utils.torchutils

nessai.utils.torchutils#

Utilities for configuring torch.

Functions#

set_torch_default_dtype(→ torch.dtype)

Set the default dtype for torch tenors.

Module Contents#

nessai.utils.torchutils.set_torch_default_dtype(dtype) torch.dtype#

Set the default dtype for torch tenors.

If dtype is None, returns the default dtype.

Parameters:
dtype{“float32”, “float64”, torch.dtype}

The new default dtype for torch.

Returns:
torch.dtype

The torch dtype used to set the default.