-
Notifications
You must be signed in to change notification settings - Fork 8
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
Can't Load Models in Tensorflow #1
Comments
When you try to load that model, I recommend setting the version of
TensorFlow to 2.5 or below
2022년 11월 11일 (금) 오전 12:13, chigkim ***@***.***>님이 작성:
… Thanks so much for quick response on FigmaAI/zeplin-ml#1
<FigmaAI/zeplin-ml#1>!
I'm having a problem loading the models.
If I try to load using
tf.keras.models.load_model("rico/models/mobilenetv2-50k/saved-model/saved_model"),
it throws error below.
WARNING:tensorflow:SavedModel saved prior to TF 2.5 detected when loading Keras model. Please ensure that you are saving the model with model.save() or tf.keras.models.save_model(), *NOT* tf.saved_model.save(). To confirm, there should be a file named "keras_metadata.pb" in the SavedModel directory.
ValueError: Unable to create a Keras model from SavedModel at design-system-detector/rico/models/mobilenetv2-50k/saved-model/saved_model. This SavedModel was exported with `tf.saved_model.save`, and lacks the Keras metadata file. Please save your Keras model by calling `model.save` or `tf.keras.models.save_model`.
Note that you can still load this SavedModel with `tf.saved_model.load`.
If I load with tf.saved_model.load, it just returns _UserObject, and I
can't run model.predict.
AttributeError: '_UserObject' object has no attribute 'predict'
Is that possible for you to resave models, so people can load them in
recent Tensorflow?
Thanks for your help!
—
Reply to this email directly, view it on GitHub
<#1>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA7346KAHRVC2HF6WRWE54DWHUGH7ANCNFSM6AAAAAAR4VF6V4>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Actually I tried loading it with Tensorflow 2.5, 2.4, 2.3, 2.2 with no luck. I get this error.
Do you have any code snippet I can look on Colab or Kaggle for inferencing or fine tuning on Tensorflow, not Tensorflow.js? |
This is a quite old memory, but I think it would be helpful to refer to the links below:
https://gist.github.com/dusskapark/c59eae6cae2b822bf7d133a2860c4c51
Convert_RICO_for_Object_Detection_based_on_CLAY.ipynb
gist.github.com
https://gist.github.com/dusskapark/a332f8b0701449b679e4c0d766009b7c
CLAY-tensorflow2-object-detection.ipynb
gist.github.com
… On Nov 11, 2022, at 10:50 AM, chigkim ***@***.***> wrote:
Actually I tried loading it with Tensorflow 2.5, 2.4, 2.3, 2.2 with no luck. I get this error.
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Do you have any code snippet I can look on Colab or Kaggle for inferencing or fine tuning on Tensorflow, not Tensorflow.js?
Thank you so much for your help
—
Reply to this email directly, view it on GitHub <#1 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AA7346JUS5UU5MDBSU7OHY3WHWQ77ANCNFSM6AAAAAAR4VF6V4>.
You are receiving this because you commented.
|
Thank you!!!
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks so much for quick response on FigmaAI/zeplin-ml/issues/1!
I'm having a problem loading the models.
If I try to load using tf.keras.models.load_model("rico/models/mobilenetv2-50k/saved-model/saved_model"), it throws error below.
If I load with tf.saved_model.load, it just returns _UserObject, and I can't run model.predict.
AttributeError: '_UserObject' object has no attribute 'predict'
Is that possible for you to resave models, so people can load them in recent Tensorflow?
Thanks for your help!
The text was updated successfully, but these errors were encountered: