Message Boards Message Boards

Importing TensorFlow neural networks stored as *.h5

Hi All,

I have some pre-trained networks generated by TensorFlow stored as *.h5 files. I can import the *.h5 files in Mathematica and they seem to contain all the needed information to rebuild the networks. But before I start working on how to convert the information in those files to Mathematica neural nets I thought I might check if anyone has a solution already.

The only way I found online is to convert the *.h5 files to MXNet files using Microsoft model management of deep neural networks (link)

If anyone has any ideas or tips I would be very grateful!

POSTED BY: Martijn Froeling
2 Replies

The best importer right now is from ONNX so I would start with a Tensorflow -> ONNX converter like this https://github.com/onnx/tensorflow-onnx

There is also a small tutorial by Microsoft https://docs.microsoft.com/en-us/windows/ai/windows-ml/tutorials/tensorflow-convert-model

Thanks that's very helpful, will give it a try

POSTED BY: Martijn Froeling
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract