class lightning.pytorch.plugins.precision.DoublePrecisionPlugin[source]

Bases: lightning.pytorch.plugins.precision.precision_plugin.PrecisionPlugin

Plugin for training with double (torch.float64) precision.

connect(model, optimizers, lr_schedulers)[source]

Converts the model to double precision and wraps it in a LightningDoublePrecisionModule to convert incoming floating point data to double (torch.float64) precision.

Does not alter optimizers or lr_schedulers.

Return type

Tuple[Module, List[Optimizer], List[Any]]


A context manager to change the default tensor type.

See: torch.set_default_tensor_type()

Return type

Generator[None, None, None]