随笔 - 56  文章 - 8 评论 - 3 阅读 - 88066
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

代码: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   一点飞鸿  阅读(4383)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示