onnx-simplifier:简化您的Onnx模型

时间:2021-04-29 03:44:53
【文件属性】:
文件名称:onnx-simplifier:简化您的Onnx模型
文件大小:151KB
文件格式:ZIP
更新时间:2021-04-29 03:44:53
Python ONNX简化器 ONNX很棒,但有时太复杂了。 背景 有一天,我想将以下简单的重塑操作导出到ONNX: import torch class JustReshape ( torch . nn . Module ): def __init__ ( self ): super ( JustReshape , self ). __init__ () def forward ( self , x ): return x . view (( x . shape [ 0 ], x . shape [ 1 ], x . shape [ 3 ], x . shape [ 2 ])) net = JustReshape () model_name = 'just_reshape.onnx' dummy_input = torch . randn ( 2 ,
【文件预览】:
onnx-simplifier-master
----setup.py(1KB)
----.gitignore(2KB)
----.travis.yml(358B)
----LICENSE(11KB)
----.github()
--------ISSUE_TEMPLATE()
----onnxsim()
--------__init__.py(68B)
--------onnx_simplifier.py(19KB)
--------__main__.py(5KB)
----README.md(3KB)
----imgs()
--------complicated_reshape.png(26KB)
--------simple_reshape.png(5KB)
--------comparison.png(111KB)

网友评论