代码: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,再次运行正常

AttributeError: module 'torchvision' has no attribute 'transforms'的更多相关文章

  1. python中引入包的时候报错AttributeError: module 'sys' has no attribute 'setdefaultencoding'解决方法?

    python中引入包的时候报错:import unittestimport smtplibimport timeimport osimport sysimp.reload(sys)sys.setdef ...

  2. Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法

    最近在编写Python脚本过程中遇到一个问题比较奇怪:Python脚本完全正常没问题,但执行总报错"AttributeError: 'module' object has no attrib ...

  3. attributeError:'module' object has no attribute ** 解决办法

    写了一个小脚本,执行的时候报错: Traceback (most recent call last): File "F:/test/qrcode.py", line 109, in ...

  4. AttributeError: 'module' object has no attribute 'TornadoAsyncNotifier'

    /*************************************************************************** * AttributeError: 'modu ...

  5. AttributeError: 'module' object has no attribute 'Thread'

    $ python thread.py starting at: 2015-08-05 00:24:24Traceback (most recent call last):  File "th ...

  6. AttributeError: module 'enum' has no attribute 'IntFlag'

    Mac PyCharm新建以Python3.6.1为解释器的Django项目的时候出现以下错误提示: AttributeError: module 'enum' has no attribute 'I ...

  7. 【问题解决方案】AttributeError: module 'pygal' has no attribute 'Worldmap'

    <Python编程:从入门到实践>- 16章-16.2.5制作世界地图 import pygal 后报如标题的error 参考CSDN 解决:AttributeError: module ...

  8. 安装pandas报错(AttributeError: 'module' object has no attribute 'main')

    在pycharm中安装pandas出现报错:AttributeError: 'module' object has no attribute 'main', 刚开始以为是pip的版本太旧了,于是乎将其 ...

  9. AttributeError: 'module' object has no attribute 'enableTrace'

    Traceback (most recent call last): File "Long-lived-connection.py", line 29, in <module ...

  10. Python 3.6安装yaml时报"AttributeError: module 'pip' has no attribute 'main'"和“Non-zero exit code”错误

    1.Python 3.6安装yaml时一开始报AttributeError: module 'pip' has no attribute错误,根据网上提供的解决方法修改Pycharm安装目录D:\Pr ...

随机推荐

  1. python打开Excel中指定的sheet表

    一个Excel中有多个sheet的时候,你在第几个sheet保存关闭的,那下次打开就在原来的那个表的位置,所以有时候你想--在打开一个Excel的时候指定到其中的一个sheet表,那么使用第三方库xl ...

  2. 多个git账户ssh密钥配置

    假设两git网站:A.com和B.com,在这两个网站上使用的邮箱和用户名分别为a@mail, userA和b@mail, userB. 清除全局配置 git config --global --li ...

  3. python + uiautomator2 常用公共方法封装

    前言 由于公司UI自动化框架底层用的是Uiautomator2,所以我就用Uiautomator2搭了一套UI自动化框架,思路其实和Appnium一样的. uiautomator2是一个自动化测试开源 ...

  4. 简体Windows系统登录玩新枫之谷方法

    2022-2-23  游戏更新后Locale.Emulato失效,64位游戏使用新的工具Locale_Remulator,请自行到GitHub上搜索下载,使用方法与Locale.Emulato类似. ...

  5. [转]NET实现RSA AES DES 字符串 加密解密以及SHA1 MD5加密

    表明来源 https://www.cnblogs.com/shanranlei/p/3630944.html#!comments 本文列举了    数据加密算法(Data Encryption Alg ...

  6. HTML完整语法学习

    https://www.cnblogs.com/douluo/archive/2021/11/20/15582217.html

  7. c++学习 5 预处理

    一 内存分区 内存的分区变量存储,一般可以分为以下五个区,它们分别是: 可读可写     堆区:使用malloc.calloc.realloc.free以及c++里面的new和delete去动态申请. ...

  8. PLC入门笔记9

    梯形图电路之电机控制 电机直接启动控制电路 电机正反停控制电路 我的图.. 但愿最后说的不要发生吧 例如下错了程序 导致... 最好外部电路互锁一下.. 电机故障判断电路 我的图.. 电机故障转换电路 ...

  9. LocalDateTime接收前端String格式

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime createTime; 实体类属性添加注解,前 ...

  10. CSS 常用样式-盒子实体化三属性

    如果想在浏览器中具体看到一个盒子占有的实际位置,需要设置盒子可以实体化的三属性. 实体化属性: