3
$\begingroup$

Using Mathematica, I trained and exported some machine learning models with the suggested file extension .wmlf. However, I noticed that these files are stored in HDF5 format. How can I import these models (which were created using commands like foo = Classify[...] followed by Export[..., foo]) so that they can be used directly in an application that will be distributed to many people who do not have access to Mathematica? Specifically, I want to use them with ML Core or one of the common Python frameworks. Additionally, I'm curious about who owns the license to this file format and the exported models. Can you provide any guidance on how to approach this situation?

e.g. Create a model/classifier in Mathematica and use it in an application via the apple/play store.

$\endgroup$
4
  • $\begingroup$ Related: Deploying A Classifier Function, Save neural network after training. $\endgroup$
    – MarcoB
    Commented Apr 16, 2023 at 14:02
  • $\begingroup$ I suppose you could save it as a mxnet model as Mathematica is using mxnet as I understand and then convert that to something pytorch could handle but that seemed to cause a problem according to this post discuss.pytorch.org/t/mxnet-to-pytorch-via-mmdnn/88368 $\endgroup$ Commented Apr 16, 2023 at 19:08
  • $\begingroup$ I suppose if nothing else works you could always save the weights and activation functions directly in a more standard format and rebuild the network in pytorch and then save it from there. $\endgroup$ Commented Apr 16, 2023 at 19:12
  • $\begingroup$ Thanks for the replies, I'll try to load the model into mxnet sometime over the next week. Although mxnet at first glance looks like huge :) $\endgroup$
    – Jeremy L
    Commented Apr 20, 2023 at 7:22

0

Your Answer

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