I have a Neural Network implemented in Python with Keras. Once I have trained it I have exported the model and I have got two files: model.js and model.h5. Now I want to classify in real time inside a .NET project and I want to use the trained Neural Network for it.
Is there a way in ML.NET of loading the model and trained weights exported with python into a model object?
I have seen in the documentation[1] that a previous saved model can be loaded, but apparently is storage in a .zip and I could not find the format (maybe to make a script that takes the model from python and 'translate' it to the ML.NET model.
Apparently the hdf5 format is a standard[2], there is a way to load it with ML.NET?
[1] https://learn.microsoft.com/en-us/dotnet/machine-learning/how-to-guides/consuming-model-ml-net
[2] https://support.hdfgroup.org/HDF5/doc1.6/UG/10_Datasets.html
ML.net supports ONNX models, as in this example.
You can convert your keras model to ONNX model via WinMLTools
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With