• Docs >
  • Utils >
  • torchtnt.utils.prepare_module.prepare_module
Shortcuts

torchtnt.utils.prepare_module.prepare_module

torchtnt.utils.prepare_module.prepare_module(module: Module, device: device, *, strategy: Optional[Union[Strategy, str]] = None, swa_params: Optional[SWAParams] = None, torch_compile_params: Optional[TorchCompileParams] = None, activation_checkpoint_params: Optional[ActivationCheckpointParams] = None) Module

Utility to move a module to device, set up parallelism, activation checkpointing and compile.

Parameters:

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources