当前位置:网站首页>Yolov5 export the pit encountered by onnx
Yolov5 export the pit encountered by onnx
2022-06-30 11:53:00 【weixin_ forty-four million eight hundred and thirty-four thousa】
1、 function export.py Times wrong ‘Upsample’ object has no attribute ‘recompute_scale_factor’
terms of settlement : find Upsampling.py file ( My files were found in this path , For reference only D:\Program Files\Lib\site-packages\torch\nn\modules), take forward The function is modified as follows :
def forward(self, input: Tensor) -> Tensor:
return F.interpolate(input, self.size, self.scale_factor, self.mode, self.align_corners) # Just delete the part in the brackets ,recompute_scale_factor=self.recompute_scale_factor
2、 Run after the above modification export.py, The program will no longer report errors , But failed to export onnx, Lift not installed onnx, And prompt to use the following command to install :
pip install 'onnx'
When installing according to the lifting command , slowly , Tsinghua mirror can be installed in seconds , The order is as follows :
pip install 'onnx' -i https://pypi.tuna.tsinghua.edu.cn/simple/
Install well onnx after , Run again export.py, Successfully exported onnx file .
export onnx After the document , Follow the program prompts , Use this link https://netron.app Can open onnx file , After I open it, it is shown in the following figure :
边栏推荐
- 重新理解oauth2.0协议进行联合登录
- Summer vacation study record
- R语言ggplot2可视化:使用ggplot2可视化散点图、在geom_point参数中设置alpha参数指定数据点的透明度级别(points transparent、从0到1)
- A man is a Book
- WebView, Scrollview sliding conflict correction
- led背光板的作用是什麼呢?
- Win10 R package installation error: not installed in arch=i386
- Automatic database growth
- NoSQL——Redis的配置与优化
- PointDistiller:面向高效紧凑3D检测的结构化知识蒸馏
猜你喜欢

服务器常用的一些硬件信息(不断更新)

led背光板的作用是什么呢?

Qualcomm released the "magic mirror" of the Internet of things case set, and digital agriculture has become a reality

建立自己的网站(13)

Limited time appointment | Apache pulsar Chinese developer and user group meeting in June

The operation and maintenance security gateway (Fortress machine) of Qiming star group once again won the first place!

1175. 质数排列

What is erdma as illustrated by Coptic cartoon?

Review the writing software with characteristics

How to analyze native crash through GDB
随机推荐
Digitalization is not a trial, but a wading out of "Xingzhi Digital China" × History of Foxconn
1175. 质数排列 : 乘法原理运用题
Installing onnx is very slow. Use Tsinghua image
盘点那些具有特色的写作软件
Alibaba cloud lifeifei: China's cloud database has taken the lead in many mainstream technological innovations abroad
R language view version R package view version
R language ggplot2 visualization: use ggplot2 to visualize the scatter diagram and use scale_ x_ The log10 function configures the value range of the X axis to be logarithmic coordinates
Qt嵌入子Qt程序窗口到当前程序
R language ggplot2 visual Facet: gganimate package is based on Transition_ The time function creates a dynamic scatter graph animation (GIF) and uses the labs function to add a dynamic time title to t
A man is a Book
建立自己的网站(13)
Multiparty cardinality testing for threshold private set-2021: Interpretation
EMC surge
Typescript readonlyarray (read only array type) details
Lucene full text search toolkit learning notes summary
数据库 自动增长
go-zero微服务实战系列(八、如何处理每秒上万次的下单请求)
【云原生 | Kubernetes篇】深入了解Deployment(八)
Discussion on the essence of "FPGA mining" from open source projects
R语言ggplot2可视化:使用ggplot2可视化散点图、在geom_point参数中设置show_legend参数为FALSE配置不显示图例信息