代码: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. 模块二:os模块、sys模块、json模块、pickle模块,包

    os模块 1 os模块是与操作系统交互的一个接口 2 import os: 3 1.获取当前工作目录 4 print(os.getcwd()) 5 6 2.切换到D:\yuan文件目录 7 os.ch ...

  2. oracle常用知识随笔

    1.创建表空间及用户赋权 create tablespace spaceone datafile '/dev/spaceone'size 80mextent management localsegme ...

  3. vite 路径别名 @ 配置

    vite.config.ts resolve.alias 配置 const path = require('path'); import { defineConfig } from 'vite'; i ...

  4. php excel导出列超过26个字母处理

    /** * String from columnindex * * @param int $pColumnIndex Column index (base 0 !!!) * @return strin ...

  5. 为动态二级域名申请https的免费证书.

    前面已经讲过将nginx部署,并注册了免费的二级域名.但将网址发给儿子,儿子说微信已经不能打开http的网址了,所以一想还是研究一下https的证书申请. 网上有很多讲通过,acme的脚本来自动化申请 ...

  6. scottrade 手机应用中英文翻译

    Dashboard       Watch List 自选股 MARKET & NEWS 市场 & 新闻 ALERTS 警告 MONEY MOVEMENT   BRANCH LOCAT ...

  7. Debug --> 箱线图

    箱线图主要用于反映原始数据分布的特征,还可以进行多组数据分布特征的比较. 箱形图最大的优点就是不受异常值的影响,能够准确稳定地描绘出数据的离散分布情况,同时也利于数据的清洗. 在箱图中,最上方和最下方 ...

  8. SpingBoot面试大汇总

    1.什么是SpringBoot? 1)用来优化Spring应用的初始搭建以及开发过程,使用特定的方式来配置(properties和yml文件) 2)嵌入式的内置服务器tomcat无需部署war文件简化 ...

  9. 面向对象2(Java)

    封装 基本介绍 该露的露,该藏的藏,我们的程序设计要追求"高内聚,低耦合": 高内聚:类的内部数据操作细节自己完成,不允许外部干涉 低耦合:仅暴露少量的方法给外部使用 封装(数据的 ...

  10. texstudio设置外部浏览器及右侧预览不能使用问题

    刚装的texstudio,今天不知什么原因右侧显示的pdf文件一直是以前的,百度了下没找到,自己摸索了下,只需要把构建里面pdf查看器更改下即可 如果想更改外部pdf查看器,只需要设置下命令里面外部p ...