I have a Keras (backend tensorflow) model saved in (h5 or json) format using python, but I 'don't know how to load it and use it in a C# solution. any suggestion (library, or some logics)?
1 Answer
Keras is built on TensorFlow which is a C++ project, so you can run it on almost every language you want with a simple wrapper.
Use Keras.NET (also available in nuget), and then load your model using:
var model = Keras.Models.Model.LoadModel(pathToYourModel.h5)
Good luck!
1 Comment
Viacheslav Rud'
github.com/SciSharp/TensorFlow.NET/issues/1024 (Model load of h5 format has not been supported) does not work at the moment: AsakusaRinne commented Apr 15, 2023 Hello, the loading of "h5" format keras model has not been supported. We has implemented the loading of "SavedModel" format first because it's recommended by tensorflow. The loading of "h5" format is also on our schedule but is not very urgent now. May I ask why you choose "h5" format instead of "SavedModel"?