Comments (5)
@hubgrim I am able to get a different error while reproducing the issue reported here. Kindly check the gist for reference.
The .keras extension typically represents the recommended Keras v3 format. If your model was saved in a different format (e.g., HDF5 - .h5), you'll need to use the appropriate loading function as follows;
loaded_model = tf.keras.models.load_model('custom_model.h5') # For HDF5 format
Thank you!
from tensorflow.
This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.
from tensorflow.
@hubgrim I am able to get a different error while reproducing the issue reported here. Kindly check the gist for reference. The .keras extension typically represents the recommended Keras v3 format. If your model was saved in a different format (e.g., HDF5 - .h5), you'll need to use the appropriate loading function as follows;
loaded_model = tf.keras.models.load_model('custom_model.h5') # For HDF5 format
Thank you!
Hm, I don't know why this error differs or why the saving format would be an issue, since I use the .keras extension when loading and saving. The lines are right next to each other.
from tensorflow.
@hubgrim While the .keras extension suggests a Keras model, there may be compatibility issues between the version of Keras you used to save the model and the version you're using to load it. Even small version bumps can sometimes cause errors. Please ensure the version compatibility.
Thank you!
from tensorflow.
The error arises even when saving/loading within the same script. I did not save the model at some point and reloaded it at some other time, but within the same call of the program. Both the model, that provides .save(), and load_model() were imported from tensorflow.keras.models so I don't see how this could be rooted in version incompatibility.
from tensorflow.
Related Issues (20)
- Conversion failure: tfl.batch_matmul "expected 3 but got 2" (regression since 2.14, worked in 2.13)
- ModuleNotFoundError: No module named 'tensorflow.compat' HOT 1
- `Segmentation fault` in `tf.raw_ops.ConjugateTranspose` when `perm` have negative values. HOT 1
- `Segmentation fault` in `tf.raw_ops.CollectiveGather` when `input` is empty.
- `Segmentation fault` in `tf.raw_ops.RaggedRange` and `tf.ragged.range` when `starts` or `limits` has large (postive/negative) values. HOT 1
- `Segmentation fault` in `tf.raw_ops.SparseFillEmptyRows` when the value of `dense_shape` is too large.
- `Segmentation fault` in `tf.raw_ops.TensorArrayV3` when the value of `size` is too large. HOT 2
- function object mismatch in TFOpLambda
- Import msvcp140.dll and msvcp140_1.dll from a custom location
- does pluggable custom device support distributed runtime?
- Segmentation fault in `tf.config.experimental_connect_to_cluster` with `@tf.function` HOT 1
- tf.custom_gradient silently fails when using all keyword arguments HOT 3
- It is unclear how a user should configure LD_LIBRARY_PATH after pip install tensorflow[and-cuda]
- `Check failed` in `tf.raw_ops.TensorListSplit` when the values of `element_shape` are too large.
- `Overflow` in `tf.compat.v1.nn.ctc_loss` and `tf.compat.v1.nn.ctc_loss_v2` when there are too large values in `labels`. HOT 1
- `Overflow` in `tf.raw_ops.SparseReduceMaxSparse` when there are too large values in `input_shape`.
- `Check failed` in `tf.linalg.diag` HOT 1
- `Assertion failure` in `tf.signal.inverse_stft` when the value of `frame_length` is too large.
- `Check failed` in `tf.raw_ops.GatherV2` when the value of `axis` is too large. HOT 1
- `Overflow` in `tf.raw_ops.SparseReduceSumSparse` when there are too large values in `input_shape`.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tensorflow.