Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
lee-plus-plus committed Jan 16, 2022
1 parent 68dc0a2 commit a7f2937
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ssd/utils/nms.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
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

1 comment on commit a7f2937

@qlhhahaha
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent! Your commit has perfectly solved my error which was caused by my 0.11.0 version torchvision.

Please sign in to comment.