Comments (5)
You should first convert mxnet pre-trained model to IR(see here), and then convert IR to caffe.
I will take resnet152 model as an example:
-
Convert mxnet to IR:
python -m mmdnn.conversion._script.convertToIR -f mxnet -n mxnet/models/resnet-152-symbol.json -w mxnet/models/resnet-152-0000.params -d resnet152 --inputShape 3 224 224 -
Convert IR to caffe code:
python -m mmdnn.conversion._script.IRToCode -f caffe -n resnet152.pb -w resnet152.npy -d caffe_resnet152.py -dw caffe_resnet152.npy -
Generate caffe model from code:
python caffe_resnet152.py -w caffe_resnet152.npy -p resnet152.prototxt -m resnet152.caffemodel
Hope this can help solve your question. Currently, from IR to caffe is under initial state, we haven't done enough test, if there is any issue when you use it, welcome to report.
from mmdnn.
thx , I have run the above example, when I run the first command , Loadiing I met three warnings: 1.MXNet Parser has not supported operator num with name data. 2. convert the null operator with name [data] into tnput layer. 3. SoftmaxOutput attrs are not supported in IR. So, When I run the second command ,I met a error that printf("=======current_node=======\n{}".format(current_node.layer),file=f)
SyntaxError: invalid syntax .
from mmdnn.
Hi @tzhang2014 ,
Fixed. Please check the new module, Thanks.
from mmdnn.
I am trying to convert from IR to Caffe. And I am getting the following error. Any help would be appreciated.
I am using python3.4 and IR is created from a Keras model.
from mmdnn.
Hi @gunasekaran7 , looks like there are some problem on Caffe Environment. Could you check it?
from mmdnn.
Related Issues (20)
- Handling multiple inputs in keras
- load higher version pytorch model error
- AttributeError: 'NoneType' object has no attribute 'name' in FusedBatchNorm HOT 3
- KeyError while converting PyTorch model to IR
- How to make modifications?
- Make upgrades?
- Fail to convert resnet101 from PyTorch to IR
- Convert Inception_v3 from Caffe to PyTorch
- SpaceToBatchND/BatchToSpaceND not supported while converting from tensorflow to caffe
- Fail to Convert resnet from Caffe to onnx and Pytorch
- mmtoir from PyTorch 2 IR missing .json, .npy and .pb file
- Getting ValueError: axes don't match array
- Pytorch model GFPGANv1.3.pth
- onnx2IR? HOT 1
- This repo is missing important files HOT 2
- How can I convert tf(.pb) to pytorch?
- Error to convert a model from IR to Pytorch
- Error converting caffe to torch model HOT 1
- pytorch to onnx
- pytorch to onnx
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 mmdnn.