From 5d03fd8cdd44ce49148653ba4ea874d9cd41a832 Mon Sep 17 00:00:00 2001 From: UltralyticsAssistant Date: Tue, 7 Jan 2025 13:43:43 +0000 Subject: [PATCH] Auto-format by https://ultralytics.com --- train.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/train.py b/train.py index 3dcf99792..7a99e71d5 100644 --- a/train.py +++ b/train.py @@ -352,8 +352,8 @@ def train(hyp, opt, device, callbacks): maps = np.zeros(nc) # mAP per class results = (0, 0, 0, 0, 0, 0, 0) # P, R, mAP@.5, mAP@.5-.95, val_loss(box, obj, cls) scheduler.last_epoch = start_epoch - 1 # do not move - - #checking if autocast is available + + # checking if autocast is available device_amp = torch.is_autocast_available(device_type=device.type) scaler = torch.amp.GradScaler(enabled=(device_amp and device.type != "cpu"))