Transformers-Tutorials
Transformers-Tutorials copied to clipboard
Upgrade Fine_tuning_DetrForObjectDetection notebook to use PyTorch Lightning with MPS support
Since PyTorch Lightning 2.0.7 supports MPS, it would be helpful for all Mac users to have the notebook compatible with the latest version of Lighting.
trainer = Trainer(accelerator="mps", max_steps=20000, gradient_clip_val=0.1)
yields error:
ValueError: boxes1 must be in [x0, y0, x1, y1] (corner) format, but got tensor([], device='mps:0', size=(0, 4))