代码: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. QPushButton CSS样式

    QPushButton:!hover { color:white; font: 20pt "楷体"; border-radius:10px; border:1px solid rg ...

  2. ABAP学习(34):cl_gui_alv_grid实现Table Maintain

    实现Table Maintain 通过类CL_GUI_ALV_GRID,实现Table Maintain功能. 实现效果: 1.创建Program; 2.创建空Screen 100; 3.创建GUI ...

  3. Access-Control-Allow-Origin php跨域报错

    Access-Control-Allow-Origin php跨域 解决办法: 1.PHP中echo:header(""Access-Control-Allow-Origin: * ...

  4. C/C++ 关键字 static 详细解析

    static关键字是一个修饰符,根const类似,被它修饰的变量和函数分别被称为静态变量和静态函数,根据修饰的对象的不同,static表现出来的作用也不同. 1. C语言中的 static 在C语言中 ...

  5. Ubuntu20.04上用tmux管理新进程

    sudo apt-get install tmux 安装tmux tmux new -s session_name 新开一个会话 tmux a -t session_name 查看指定会话 tmux ...

  6. linux三权分立账号创建

    系统管理员 创建系统管理员(sys用户)并设置密码 [root@localhost ~]# useradd sys [root@localhost ~]# passwd sys 创建组并将用户添加到组 ...

  7. mqtt的使用

    1.mqttws31.js /******************************************************************************* * Cop ...

  8. 基于 Docker 安装 Nginx 搭建静态服务器

    最近一直在准备家里的服务器部署一个自己用的网站玩玩,一来是用来学习部署的基础知识,二来,后面有空学点前端,可以部署到自己网站玩玩. 参考链接:https://juejin.cn/post/705740 ...

  9. linux 学习shell

    1. bash的父进程,子进程 [root@A~]# my_var=123[root@A~]# echo $my_var123[root@A~]# bash[root@A~]# [root@A~]# ...

  10. python 浮点除法

    昨天晚上久违地去打了次div2 一年没打,挂得很惨 早上起来试着用python写一遍唯一写出来的a题 然后发现了一个奇怪的现象 代码如下(为了方便观察已经改过了,不是解题的代码) import sys ...