clinicadl.train.ComputationalConfig¶
- class clinicadl.train.ComputationalConfig(**data: Any) None[source]¶
Configuration class to define computational parameters.
- Parameters:
gpu (bool, default=False) – Whether to use a GPU.
non_blocking (bool, default=True) – Behavior to adopt when sending data or the model to a GPU: “When
non_blockingis set toTrue, […] attempts to perform the conversion asynchronously with respect to the host, if possible. This asynchronous behavior applies to both pinned and pageable memory.” (see PyTorch documentation)amp (bool, default=True) – Whether to use
Automatic Mixed Precision.channels_last (bool, default=True) – Whether to use Channels Last Memory Format when possible.
seed (Optional[NonNegativeInt], default=None) – Global seed to control the randomness. If
None,ComputationalConfigwill look for a global seed set withclinicadl.utils.seed.seed_everything(). If a seed is passed here, it will override any global seed.deterministic (Optional[bool], default=None) – Whether to configure PyTorch’s operations in deterministic mode. If
None,ComputationalConfigwill look for a global configuration set withclinicadl.utils.seed.seed_everything(). If passed here, it will override any global configuration.