apache / mxnet

Lightweight, Portable, Flexible Distributed/Mobile Deep Learning with Dynamic, Mutation-aware Dataflow Dep Scheduler; for Python, R, Julia, Scala, Go, Javascript and more
https://mxnet.apache.org
Apache License 2.0
20.78k stars 6.79k forks source link

Converting mxnet checkpoint to Tensorflow model #4882

Open cheshirecats opened 7 years ago

cheshirecats commented 7 years ago

Currently the best method to run CNN in browser might be Keras.js (with Tensorflow backend):

https://github.com/transcranial/keras-js

On the other hand, mxnet is probably the fastest in training models.

So I wonder if there's any tools for converting trained mxnet checkpoints (.json & .params) to Tensorflow models. Thanks.

zihaolucky commented 7 years ago

Is the tool backend relevant? Or it just rely on Keras, which means it uses the Keras output, the graph definition and params. If so, https://github.com/dmlc/keras might do the trick.

cheshirecats commented 7 years ago

Hi. It just needs the model to be loadable in Keras, and then it can be exported & converted for Keras.js to use (as in Keras.js README).

Regarding https://github.com/dmlc/keras , is it a project to use mxnet as a backend for Keras? Thanks.

zihaolucky commented 7 years ago

Yes, but I haven't participate in this project. @piiswrong

cheshirecats commented 7 years ago

@zihaolucky Hi it seems Keras.js requires the model to be a Keras model, so that it be exported using save_weights and to_json, as written in https://github.com/transcranial/keras-js .

Therefore other models need to be converted to Keras models first. It would be great if such a tool can be offered.

yajiedesign commented 7 years ago

This issue is closed due to lack of activity in the last 90 days. Feel free to reopen if this is still an active issue. Thanks!

entropymaster commented 7 years ago

I am looking to do the same. Did someone find a way out for this?

futurely commented 7 years ago

https://github.com/pertusa/MXNetToCaffeConverter https://github.com/cypw/MXNet2Caffe https://github.com/wranglerwong/Mxnet2Caffe

https://github.com/ethereon/caffe-tensorflow https://github.com/hahnyuan/nn_tools

szha commented 6 years ago

@apache/mxnet-committers: This issue has been inactive for the past 90 days. It has no label and needs triage.

For general "how-to" questions, our user forum (and Chinese version) is a good place to get help.