当前位置:网站首页>AttributeError: ‘Upsample‘ object has no attribute ‘recompute_scale_factor‘
AttributeError: ‘Upsample‘ object has no attribute ‘recompute_scale_factor‘
2022-06-25 06:39:00 【cv-daily】
使用torch 1.11.0+cu102 CPU运行u版yolov5时报错:
Traceback (most recent call last):
File "yolov5/detect.py", line 293, in <module>
main(opt)
File "yolov5/detect.py", line 288, in main
run(**vars(opt))
File "anaconda3/envs/yolov5/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "yolov5/detect.py", line 152, in run
pred = model(img,
File "anaconda3/envs/yolov5/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "yolov5/models/yolo.py", line 195, in forward
return self.forward_once(x, profile, visualize) # single-scale inference, train
File "yolov5/models/yolo.py", line 226, in forward_once
x = m(x) # run
File "anaconda3/envs/yolov5/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "anaconda3/envs/yolov5/lib/python3.8/site-packages/torch/nn/modules/upsampling.py", line 154, in forward
recompute_scale_factor=self.recompute_scale_factor)
File "anaconda3/envs/yolov5/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1185, in __getattr__
raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'Upsample' object has no attribute 'recompute_scale_factor'
Process finished with exit code 1
参考:http://www.manongjc.com/detail/28-llivmebvzwrvnfa.html
重新装pytorch
conda install pytorch==1.9.0 torchvision==0.10.0 torchaudio==0.9.0 cudatoolkit=10.2 -c pytorch
边栏推荐
- Design a MySQL table for message queue to store message data
- [leetcode] two num · sum of two numbers
- [QT] shortcut key
- Cocos学习日记3——api获取节点、组件
- VectorDraw Web Library 10.10
- Notes: [open class] neural network and deep learning -- tensorflow2.0 actual combat [Chinese course]
- Common functions of OrCAD schematic
- One year's time and University experience sharing with CSDN
- China Mobile MCU product information
- lotus v1.16.0-rc3 calibnet
猜你喜欢

Weimeisi new energy rushes to the scientific innovation board: the annual revenue is 1.7 billion, and the book value of accounts receivable is nearly 400million

Sichuan earth microelectronics ca-is1300 isolated operational amplifier for current detection is on the market

Introduction to Sichuan Tuwei ca-is3082w isolated rs-485/rs-422 transceiver

CPDA|数据分析师成长之路如何起步?

鸿蒙页面菜单的选择

Chuantu microelectronics ca-if1051 can-fd transceiver

函数模板_类模板

LabVIEW generate application (exe) and installer

图扑软件数字孪生 3D 风电场,智慧风电之海上风电

Sichuan earth microelectronics ca-is1200 isolated operational amplifier for current detection
随机推荐
我的处女作杀青啦!
Chang Wei (variables and constants) is easy to understand
Mysql database import SQL file display garbled code
Construction of occupancy grid map
Ltpowercad II and ltpowerplanner III
Home environment monitoring system design (PC version) (mobile app version to be determined)
Kube scheduler source code analysis (1) - initialization and startup analysis
VectorDraw Developer Framework 10.10
MySQL face Scripture eight part essay
13 `bs_ duixiang. Tag tag ` get a tag object
Cocos学习日记3——api获取节点、组件
Global variables & local variables
正版photoshop2022购买体验经历分享
【批处理DOS-CMD命令-汇总和小结】-文件与目录操作命令(md、rd、xcopy、dir、cd、set、move、copy、del、type、sort)
[QT] shortcut key
【Qt】快捷键
[introduction to UVM== > episode_9] ~ register model, integration of register model, general methods of register model, application scenarios of register model
[Batch dos - cmd Command - Summary and Summary] - External Command - cmd Download Command, wget Command
关于硬件问题造成的MCU死机,过来人简单的谈一谈
无“米”,也能煮“饭”利用“点云智绘”反演机载LiDAR林下缺失地面点攻略