Skip to content

Commit

Permalink
Merge branch 'master' into instance_seg
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher committed Sep 11, 2022
2 parents 3c84158 + 23701ea commit 6ddcf5a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion utils/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import sys
import time
import urllib
from copy import deepcopy
from datetime import datetime
from itertools import repeat
from multiprocessing.pool import ThreadPool
Expand Down Expand Up @@ -535,7 +536,7 @@ def amp_allclose(model, im):
f = ROOT / 'data' / 'images' / 'bus.jpg' # image to check
im = f if f.exists() else 'https://ultralytics.com/images/bus.jpg' if check_online() else np.ones((640, 640, 3))
try:
assert amp_allclose(model, im) or amp_allclose(DetectMultiBackend('yolov5n.pt', device), im)
assert amp_allclose(deepcopy(model), im) or amp_allclose(DetectMultiBackend('yolov5n.pt', device), im)
LOGGER.info(f'{prefix}checks passed ✅')
return True
except Exception:
Expand Down

0 comments on commit 6ddcf5a

Please sign in to comment.