Auto-format by https://ultralytics.com
parent
c29e1d62e3
commit
bc7e3331f1
2
train.py
2
train.py
|
@ -409,7 +409,7 @@ def train(hyp, opt, device, callbacks):
|
|||
imgs = nn.functional.interpolate(imgs, size=ns, mode="bilinear", align_corners=False)
|
||||
|
||||
# Forward
|
||||
with torch.amp.autocast('cuda', amp):
|
||||
with torch.amp.autocast("cuda", amp):
|
||||
pred = model(imgs) # forward
|
||||
loss, loss_items = compute_loss(pred, targets.to(device)) # loss scaled by batch_size
|
||||
if RANK != -1:
|
||||
|
|
Loading…
Reference in New Issue