Shortcuts

DoublePrecision

class lightning_fabric.plugins.precision.DoublePrecision[source]

Bases: lightning_fabric.plugins.precision.precision.Precision

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

convert_input(data)[source]

Convert model inputs (forward) to the floating point precision type of this plugin.

This is a no-op for tensors that are not of floating-point type or already have the desired type.

Return type:

Tensor

convert_module(module)[source]

Convert the module parameters to the precision type this plugin handles.

This is optional and depends on the precision limitations during optimization.

Return type:

Module

forward_context()[source]

A context manager to change the default tensor type.

See: torch.set_default_tensor_type()

Return type:

Generator[None, None, None]


© Copyright Copyright (c) 2018-2023, Lightning AI et al...

Built with Sphinx using a theme provided by Read the Docs.