-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
cannot use tf.keras.models.load_model to load SavedModel #1081
Comments
@ericxsun Thank you for reporting this issue. It appears your issue is a variant of Issue #1070. A PR in underdevelopment to fix the issue. If you wish, you can monitor the status of PR #1074. Right now the PR addresses the issue you point out regarding |
Thanks a lot. PR #1074 solves the The problem is Cannot load saved model (in SavedModel) by only using Since I've fixed the shape TypeError locally: |
In Ludwig's unit test, we use |
YES, you're right. Thanks a lot
|
@ericxsun Good to hear the last posting helped. If this addresses your concern, I'll close the issue. |
Describe the bug
save the trained model in format of SavedModel and reload it using
tf.keras.models.load_model
won't suceed with the following exception:To Reproduce
using the example mnist-simple-train
step 1: train the model with the following code
when finished, one could got the results:
step 2: save the model
suceed with some warning, looks like:
step 3: reload the saved model
one could got the following error
Environment (please complete the following information):
Additional context
maybe the line hidden = tf.reshape(hidden, [shape[0], -1]) in
ludwig/encoders/image_encoders.py
should be replaced by:The text was updated successfully, but these errors were encountered: