TensorFlow.NET icon indicating copy to clipboard operation
TensorFlow.NET copied to clipboard

[Feature Request]: Add .h5 model support.

Open Mustenaka opened this issue 1 year ago • 1 comments

Background and Feature Description

Add .h5 model support.

when i try use load_model for .h5 model, it will crash and throw an error.

System.NotImplementedException HResult=0x80004001 Message=Model load of h5 format has not been supported. Please submit an issue to https://github.com/SciSharp/TensorFlow.NET/issues if it's needed. Source=Tensorflow.Keras

API Definition and Usage

var model = KerasApi.keras.models.load_model("xxx_model.h5");

// or
var model = tf.keras.models.load_model("xxx_model.h5");

Alternatives

No response

Risks

No response

Mustenaka avatar Nov 29 '24 06:11 Mustenaka

model.load_weights(@".\Debug\saved_model_2025-03-14-17-42-24\weights.h5");

blackcement avatar Mar 14 '25 15:03 blackcement