4
$\begingroup$

I have used Classify function to train a series of photos using neural network, and I want to export the code so that I can use it elsewhere without Mathematica.

Is there any one who can help me with this? Or how to extract the structure of the neuralnetwork so I can put it into somewhere else?

$\endgroup$
1

1 Answer 1

5
$\begingroup$

If you train a network directly with NetTrain (say, starting from a pre-trained NetModel), you will be able to export the net to MXNet's format starting in Mathematica 11.2, which will be released soon. It is as simple as writing Export["mynet.json", net, "MXNet"]. This will also produce a "params" file, and it is then straightforward to load both the JSON and params file from C++ using MXNet (see http://mxnet.io/api/python/symbol.html#mxnet.symbol.load).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.