Accelerator
class lightning.pytorch.accelerators. Accelerator [source]
Bases: lightning.fabric.accelerators.accelerator.Accelerator
, abc.ABC
The Accelerator base class for Lightning PyTorch.
Warning
Writing your own accelerator is an experimental feature.
get_device_stats ( device ) [source]
Get stats for a given device.
Parameters
device (Union
[device
, str
, int
]) – device for which to get stats
Return type
Dict
[str
, Any
]
Returns
Dictionary of device stats
setup ( trainer ) [source]
Setup plugins for the trainer fit and creates optimizers.
Parameters
trainer (Trainer
) – the trainer instance
Return type
None
To analyze traffic and optimize your experience, we serve cookies on this site. By clicking or navigating, you agree to allow our usage of cookies. Read PyTorch Lightning's Privacy Policy .