当前位置:网站首页>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
边栏推荐
- 國外LEAD域名郵箱獲取途徑
- TEMPEST HDMI泄漏接收 2
- STL教程4-输入输出流和对象序列化
- What common APIs are involved in thread state changes
- 正版photoshop2022購買體驗經曆分享
- College entrance examination voluntary filling, why is the major the last consideration?
- 稳压二极管的原理,它有什么作用?
- 【UVM入門 ===> Episode_9 】~ 寄存器模型、寄存器模型的集成、寄存器模型的常規方法、寄存器模型的應用場景
- The principle of Zener diode, what is its function?
- MySQL face Scripture eight part essay
猜你喜欢
![[pytest] modify the logo and parameterization in the allure Report](/img/c0/93519da008ec137c447bb11aa7b73e.png)
[pytest] modify the logo and parameterization in the allure Report

Unity3D邪门实现之GUI下拉菜单Dropdown设计无重复项

Chuantu microelectronics high speed and high performance rs-485/422 transceiver series

The principle of Zener diode, what is its function?

【UVM入門 ===> Episode_9 】~ 寄存器模型、寄存器模型的集成、寄存器模型的常規方法、寄存器模型的應用場景

realsense d455 semantic_slam实现语义八叉树建图
![[batch dos-cmd command - summary and summary] - external command -cmd download command and packet capture command (WGet)](/img/00/5a5b081b78ad6a6c1c3a3c847dd315.png)
[batch dos-cmd command - summary and summary] - external command -cmd download command and packet capture command (WGet)

Path planner based on time potential function in dynamic environment

How is the network connected?

Sichuan Tuwei ca-if1051 can transceiver has passed aec-q100 grade 1 certification
随机推荐
TEMPEST HDMI泄漏接收 1
高考志愿填报,为啥专业最后考虑?
Chuantu microelectronics breaks through the high-end isolator analog chip market with ca-is3062w
College entrance examination voluntary filling, why is the major the last consideration?
[C language] one dimensional array
Common functions of OrCAD schematic
Chuantuwei ca-is3720lw alternative material No. iso7820fdw
Display purchase Summary - Dell 2705qm BenQ pd2700u
Chuantu microelectronics high speed and high performance rs-485/422 transceiver series
VectorDraw Web Library 10.10
Tupu software digital twin 3D wind farm, offshore wind power of smart wind power
Large funds support ecological construction, and Plato farm builds a real meta universe with Dao as its governance
useMemo模拟useCallback
Why "New Year's Eve", the original memory burst!
VectorDraw Developer Framework 10.10
“空间转换”显著提升陡崖点云的地面点提取质量
【批处理DOS-CMD命令-汇总和小结】-应用程序启动和调用、服务和进程操作命令(start、call、)
Distributed quorum NWR of the alchemy furnace of the Supreme Master
[batch dos-cmd command - summary and summary] - commands related to Internet access and network communication (Ping, Telnet, NSLOOKUP, ARP, tracert, ipconfig)
VectorDraw Web Library 10.10