AttributeError: module 'torchvision' has no attribute 'transforms'
代码: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'的更多相关文章
- python中引入包的时候报错AttributeError: module 'sys' has no attribute 'setdefaultencoding'解决方法?
python中引入包的时候报错:import unittestimport smtplibimport timeimport osimport sysimp.reload(sys)sys.setdef ...
- Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法
最近在编写Python脚本过程中遇到一个问题比较奇怪:Python脚本完全正常没问题,但执行总报错"AttributeError: 'module' object has no attrib ...
- attributeError:'module' object has no attribute ** 解决办法
写了一个小脚本,执行的时候报错: Traceback (most recent call last): File "F:/test/qrcode.py", line 109, in ...
- AttributeError: 'module' object has no attribute 'TornadoAsyncNotifier'
/*************************************************************************** * AttributeError: 'modu ...
- AttributeError: 'module' object has no attribute 'Thread'
$ python thread.py starting at: 2015-08-05 00:24:24Traceback (most recent call last): File "th ...
- AttributeError: module 'enum' has no attribute 'IntFlag'
Mac PyCharm新建以Python3.6.1为解释器的Django项目的时候出现以下错误提示: AttributeError: module 'enum' has no attribute 'I ...
- 【问题解决方案】AttributeError: module 'pygal' has no attribute 'Worldmap'
<Python编程:从入门到实践>- 16章-16.2.5制作世界地图 import pygal 后报如标题的error 参考CSDN 解决:AttributeError: module ...
- 安装pandas报错(AttributeError: 'module' object has no attribute 'main')
在pycharm中安装pandas出现报错:AttributeError: 'module' object has no attribute 'main', 刚开始以为是pip的版本太旧了,于是乎将其 ...
- AttributeError: 'module' object has no attribute 'enableTrace'
Traceback (most recent call last): File "Long-lived-connection.py", line 29, in <module ...
- 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 ...
随机推荐
- C/C++:printf 函数格式化输出,用法详细记录
printf ( print format )函数是接触C/C++之后接触的第一个函数,它的功能除了输出hello world外,更重要的是进行格式化输出,比如输出整数的%d,输出小数的%f,%lf ...
- SQL----EXISTS 关键字EXISTS基本意思
1.EXISTS基本意思 英语解释就是存在,不过他的意思也差不多,相当于存在量词'З'.他不返回数据的,当后带带的查询为空值是,返回"FALSE",非空则返回"TRUE& ...
- 学校——DFS图的遍历
学校实验 没什么多说的 就是实现一个图的遍历 由于学校已经输入的片段过于晦涩难懂 无法进行 在网上看了别人写的代码 提升了理解代码的一点能力 #include"string.h" ...
- CH32F103C8T6的USB开发(一)
一.背景 项目用到单片机采集模拟量数据,原先使用USB转串口,速度嫌慢,还要转串口芯片,电脑还要安装驱动,现更改为采用USB的HID类来传输. 二.单片机选型 STM32F103的USB接口简单易用, ...
- 对象和类复习题(c++ prime plus )
第一题: 为复习题5描述的类提供方法定义,并编写一个小程序来演示所有的特性: bank.h #ifndef BACK_H_ #define BACK_H_ #include <string> ...
- linux-vi/vim常用操作键
命令模式: :w 将编辑的数据写入硬盘档案中(常用) :w! 若文件属性为『只读』时,强制写入该档案.不过,到底能不能写入, 还是跟你对该档案的档案权限有关啊! :q 离开 vi (常用) :q! 若 ...
- 在NCBI中下载SRA数据
目前,在NCBI中下载SRA数据主要有三种方式: 利用Aspera工具下载. 利用SRA Toolkit下载. 利用wget命令直接下载 第三种最为方便.其中的关键是得到下载数据的链接,即ftp的地址 ...
- 学习JavaScript第一周
三种输出方式,console.log.element.write.alert(): 简单数据类型:数值型.字符串型.布尔类型.undefined.null 复杂数据类型:对象 数据类型的转换:字符串转 ...
- nodejs中router的使用
一.划分文件使用Router 创建一个routes目录,专门用于放置路由文件,通过module.exports导出供外部使用. // 引入类 const Koa =require('koa'); // ...
- 记 第一次linux下简易部署 django uwsgi nginx
1.首先确定django项目是跑起来的 2.装nginx uwsgi ,网上教程一大堆 3.uwsgi的配置了 我是通过ini启动的 随意找个顺手的文件夹创建uwsgi.ini文件 我是在/home ...