ultralytics 8.0.53 DDP AMP and Edge TPU fixes (#1362)

Co-authored-by: Richard Aljaste <richardaljasteabramson@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Vuong Kha Sieu <75152429+hotfur@users.noreply.github.com>
This commit is contained in:
Glenn Jocher
2023-03-12 02:08:13 +01:00
committed by GitHub
parent 177a68b39f
commit f921e1ac21
46 changed files with 1045 additions and 384 deletions

View File

@ -96,6 +96,13 @@ def test_val_scratch():
model.val(data='coco8.yaml', imgsz=32)
def test_amp():
if torch.cuda.is_available():
from ultralytics.yolo.engine.trainer import check_amp
model = YOLO(MODEL).model.cuda()
assert check_amp(model)
def test_train_scratch():
model = YOLO(CFG)
model.train(data='coco8.yaml', epochs=1, imgsz=32)
@ -213,6 +220,3 @@ def test_result():
res = model(SOURCE)
res[0].plot()
print(res[0].path)
test_predict_img()