-
Notifications
You must be signed in to change notification settings - Fork 536
System.NotImplementedException : 'Model load of h5 format has not been supported #1024
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
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"? |
Thank you for your answer, I chose the .h because it is a network that I have already trained in Python with tensorflow-keras, and since I work in c# I wanted to reuse it |
I see. The loading of "h5" format is a big feature and support of the loading complex models (such as bert) with "SavedModel" format has higher priority in tf.net. We will implement the loading of of "h5" format model in the future but it costs time. A possible alternative is loading your model in python and save it again to "SavedModel" format, then load it in C#. If your model contains self-defined keras module, please try after the merge of #1022, which added support for it. |
hello, the model attached thanks |
in python it loads normal (.h and .pb format) but in c# no import tensorflow as tf #import tensorflow.python.framework.convert_variables_to_constants_v2 |
Hi, the file seems to be SavedModel format saved prior to TF 2.5. The loading itself is supported by using |
Hi, I used another savedModel conversion script, it solved my problem, attached the link so that others can benefit Thanks |
Hey, is the model converted by this script can be directly loaded by tf.net? |
#1032 supports this way by adding an API |
No, I didn't delete anything, as indicated above, I opted for a format.h5 conversion to frozen model.pb with a well-detailed tutorial. |
Did you succeed in tensorflow (python)? I tried loading the file with tensorflow python but failed, which tells me it cannot find variable files. |
a problem with this model that I put in attachment, I use another model, basically I took my basic model .h5 convert to .pb, but the attached model is wrong |
Thanks, I'll close this issue as completed. Please don't hesitate to tell us if any problem in the future. |
how about the loading a model? You seem to have implemented model.save , model.save_weights which saves the TF model. |
Hello,
I am trying to load a .h5 model with the load_model function (Tensorflow.Keras.Models) but I get this error
issue:
System.NotImplementedException : '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.'
any suggestions please,
Thank you
The text was updated successfully, but these errors were encountered: