Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
sieukim committed Apr 14, 2022
1 parent 68dc0a2 commit 2405763
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ssd/utils/nms.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
import torch
import torchvision

if torchvision.__version__ >= '0.3.0':
from packaging import version

if version.parse(torchvision.__version__) >= version.parse('0.3.0'):
_nms = torchvision.ops.nms
else:
warnings.warn('No NMS is available. Please upgrade torchvision to 0.3.0+')
Expand Down

0 comments on commit 2405763

Please sign in to comment.