Skip to content

Latest commit

 

History

History
16 lines (11 loc) · 412 Bytes

single_gpu.rst

File metadata and controls

16 lines (11 loc) · 412 Bytes

from pytorch_lightning.trainer.trainer import Trainer

Single GPU Training

Make sure you are running on a machine that has at least one GPU. Lightning handles all the NVIDIA flags for you, there's no need to set them yourself.

# train on 1 GPU (using dp mode) trainer = Trainer(gpus=1)