Created
May 8, 2020 01:24
-
-
Save Sg4Dylan/141d64236df8677de668f78673b15c9c to your computer and use it in GitHub Desktop.
优化 PyTorch 输出 ONNX 模型并转换为 NCNN 模型
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO OFF & CD/D "%~dp0" | |
::save as CRLF/ANSI format | |
::usage: drag ONNX model to .bat to start processing | |
:start | |
IF "%~1"=="" GOTO :END | |
:proc | |
python -m onnxsim "%~nx1" "%~nx1.sim.onnx" | |
onnx2ncnn.exe "%~nx1".sim.onnx | |
del "%~nx1".sim.onnx | |
ncnn2mem.exe ncnn.param ncnn.bin ncnn.id.h ncnn.mem.h | |
del ncnn.param.bin | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment