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 ...
随机推荐
- 暑假学习6 hdfs shell命令
命令行操作:cli Hadoop的命令shell : Hadoop fs -ls file: 操作 本地的文件系统 hadoop fs -ls hdfs://nod ...
- 语言-页面-模板-Velocity
Velocity教程 - 简书 (jianshu.com) Velocity模板引擎详解 - Velocity 教程 | 编程字典 (codingdict.com) Velocity模板(VM)语言介 ...
- cheerio中文文档
这篇参考手册是对cheerio 官方文档的中文翻译 cheerio是jquery核心功能的一个快速灵活而又简洁的实现,主要是为了用在服务器端需要对DOM进行操作的地方 简介 让你在服务器端和htm ...
- 目标检测yolov5检测火龙果
一.github官方网址 https://github.com/ultralytics/yolov5/tree/v6.1 二.labelme标记数据集: (1).进入虚拟环境 (2).pip inst ...
- iOS block相关面试题
一.前言本文重点来研究一下 objc 的 block,并具体来分析一下以下一些面试题目:block 的内部实现,结构体是什么样?block 是类吗?有哪些类型?一个 int 变量被 __block 修 ...
- 训练题——DS18B20部分
Author:Cherry_Ywj 0. 前言 本文档以 DS18B20 为例,主要介绍如何针对一种传感器编写相应的驱动库,驱动是单片机开发中难度较大的一环.从看别人代码并对照 datasheet 开 ...
- x-www-form-urlencoded请求封装
<dependency> <groupId>commons-httpclient</groupId> <artifactId>commons-httpc ...
- 项目实训 DAY 13
GraphCore学习成本太高/现有资料太少,决定放弃 PlotNN用python语言生成pdf(需求:png),且不能通过仅运行python程序实现,python内生成的是tex格式,还需要加一行命 ...
- Js-document操作
# 直接获取标签 document.getElementById('gundong') #获取id为gundong的元素 document.getElementsByClassName('qalist ...
- 免费Linux RDP,用来练习linux或者Python,还能做成远程桌面
分类:资源| 阅读:1103次阅读 goorm提供了免费的Linux容器,用它来在线练习命令行是非常不错的. 它的注册非常简单:https://ide.goorm.io/ 直接用谷歌账号登录即 ...