PyTorch Lightning Documentation ================================ .. image:: https://img.shields.io/pypi/v/lightning.svg :target: https://pypi.org/project/lightning/ :alt: PyPI version .. image:: https://img.shields.io/badge/python-3.9%20%7C%203.10%20%7C%203.11%20%7C%203.12-blue :alt: Python versions **PyTorch Lightning** is the deep learning framework for professional AI researchers and machine learning engineers who need maximal flexibility without sacrificing performance at scale. Lightning organizes PyTorch code to remove boilerplate and unlock Trainer features like multi-GPU, mixed-precision, gradient accumulation, and more. .. code-block:: bash pip install lightning .. code-block:: python import lightning as L from lightning.pytorch import Trainer trainer = Trainer(max_epochs=100, accelerator="auto") trainer.fit(model, train_dataloader, val_dataloader) .. toctree:: :maxdepth: 2 :caption: Getting Started installation quickstart .. toctree:: :maxdepth: 2 :caption: User Guide trainer modules callbacks logging .. toctree:: :maxdepth: 1 :caption: Reference changelog