Comments (4)
目前mgeconvert不支持直接转到ncnn,您可以尝试一下 megengine->onnx->ncnn 能否正常转换
from mgeconvert.
求给出一些环境:
- 支持验证的后端的网址,如NCNN在线验证等
- 各类后端转NCNN的验证途径,以及你希望转换的支持方式
from mgeconvert.
一个resnet18 mge->onnx->ncnn的例子
mge->onnx
import megengine
from mgeconvert.converters.tm_to_onnx import tracedmodule_to_onnx
import numpy as np
import onnx
from megengine.traced_module import trace_module
net = megengine.hub.load(
"megengine/models", "resnet18", use_cache=True, commit=None, pretrained=True
)
net.eval()
inp = megengine.tensor(np.random.random((1,3,224,224)))
tm = trace_module(net,inp)
tracedmodule_to_onnx(tm, "resnet18.onnx")
model = onnx.load_model("resnet18.onnx")
model = onnx.optimizer.optimize(model, passes = ['eliminate_identity'])
onnx.save(model, "resnet18.onnx")
onnx->ncnn
使用ncnn提供的转换器把导出的onnx模型转到ncnn
./ncnn/build/tools/onnx/onnx2ncnn resnet18.onnx
from mgeconvert.
如果没有其他问题,这个issue就先关了,后续有问题欢迎提新的issue
from mgeconvert.
Related Issues (18)
- onnx 模型转换问题 HOT 3
- 找不到cuda_fp16.h HOT 2
- OP Split is not supported HOT 4
- onnx->mge 需要支持算子
- AssertionError: Forward Result of ONNX and Mge Mismatch -3.6064906120300293(ONNX) vs -3.5924134254455566(Mge) with model at index 3
- RuntimeError: access invalid Maybe value
- mge_to_onnx 转化得到的onnx模型有问题
- 是否有计划提供其他框架到MegEngine的转换器 HOT 1
- 带bias的linear层转onnx,为什么转换成Gemm+Add? HOT 1
- 是否支持多输入多输出的mge到onnx转化 HOT 6
- tm convert 到 caffe 参数问题 HOT 4
- ConvolutionBackwardDataOpr 初始化错误 HOT 1
- 无法转换一个简单的 UNet HOT 1
- torch->onnx->mge过程中的后半段(onnx->mge)的问题 HOT 12
- .pkl转.onnx有问题 HOT 3
- 为什么命名是以 mge 开头? HOT 1
- 执行convert mge_to_onnx ... 报错 HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mgeconvert.