代码:maskrcnn-benchmark

Python 3.6.13 |Anaconda, Inc

Traceback (most recent call last):
File "tools/train_net.py", line 18, in <module>
from maskrcnn_benchmark.engine.inference import inference
File "/home/Github/maskrcnn-benchmark/maskrcnn_benchmark/engine/inference.py", line 14, in <module>
from .bbox_aug import im_detect_bbox_aug
File "/home/Github/maskrcnn-benchmark/maskrcnn_benchmark/engine/bbox_aug.py", line 3, in <module>
import torchvision.transforms as TT
AttributeError: module 'torchvision' has no attribute 'transforms'

 

修改:

将import torchvision.transforms as TT修改为 from torchvision import transforms as TT,再次运行正常

posted on 2021-12-08 19:03  一点飞鸿  阅读(4170)  评论(0编辑  收藏  举报