Comments (7)
Hi @Dobiasd ,
There is an open issue in Keras repo # 18913 where Keras Team looking into same and expect a fix ASAP.
Thanks!
from tensorflow.
@Dobiasd Could you try to use model.save('model.h5', save_format='tf') to save the model in TensorFlow SavedModel format as the default model.save might not capture all model components. Please have a look at this gist and let us know if it helps?
Thank you!
from tensorflow.
I tried:
from tensorflow.keras.layers import Input, LSTM, Bidirectional
from tensorflow.keras.models import Model, load_model
inputs = [Input(shape=(17, 4))]
layer = Bidirectional(LSTM(units=4), merge_mode='concat')(inputs[0])
outputs = [layer]
model = Model(inputs=inputs, outputs=outputs)
model.save('model.h5', save_format='tf')
load_model('model.h5')
model.save('model.h5', save_format='tf')
raises a ValueError
:
File "h5py/h5d.pyx", line 137, in h5py.h5d.create
ValueError: Unable to synchronously create dataset (name already exists)
However, the model.h5
is written to the disk nonetheless.
But loading it (load_model('model.h5')
) fails:
File "h5py/h5o.pyx", line 189, in h5py.h5o.open
KeyError: "Unable to synchronously open object (object 'input_layer' doesn't exist)"
from tensorflow.
@Dobiasd Thank you for the response here.
@SuryanarayanaY I was able to replicate the issue reported here.
Thank you!
from tensorflow.
I am having the same issue. This and other issues have resulted in frustrating experiences when moving from previous versions of tf into tf 2.15 and TF 2.16, including 2.16.1.
from tensorflow.
Having same issue with tensorflow==2.16.1 and keras==3.2.1
Is downgrading really the only fix right now?
from tensorflow.
Hi @Dobiasd ,
Please note that Keras3 supports saving the model in .keras format only as It is now supporting multiple backends like Torch and Jax also.With .keras format this has been working fine in nightly and attached gist for reference.
If you want to save the model in tf format you might need to use model.export("saved_model") instead of model.save().
Please refer the migration guide here.
from tensorflow.
Related Issues (20)
- GPUv2 syntax error in shader generation in broadcast with different batch sizes
- XLA related ptxas version error when changing batch size HOT 2
- GPUv2 segfaults on split-head attention CLIP model
- Op support request: Matmul with constant left hand side
- TFLiteConverter produces model that doesn't conform to GPUv2 (TfLiteGpuDelegate Init: FULLY_CONNECTED: Amount of input channels should match weights width)
- TextVectorization does not convert Cyrillic characters to lowercase
- 2.12.0: memory leak in TFLite's tflite::Interpreter::Invoke() HOT 2
- GPUv2 numerical inaccuracy in simple Add + Mul
- tensorflow/tsl/cuda/cudart_stub.cc:28] Could not find cuda drivers on your machine, GPU will not be used.
- Aborted (core dumped) with `tf.raw_ops.CombinedNonMaxSuppression`
- Aborted (core dumped) with `tf.raw_ops.Dilation2DBackpropFilter`
- Aborted (core dumped) with `tf.raw_ops.FakeQuantWithMinMaxVarsPerChannelGradient` HOT 1
- Segmentation fault (core dumped) in `tf.raw_ops.FractionalMaxPoolGrad`
- Aborted (core dumped) with `tf.raw_ops.LRNGrad`
- Aborted (core dumped) with `tf.raw_ops.LSTMBlockCell`
- Aborted (core dumped) with `tf.raw_ops.LSTMBlockCellGrad` HOT 1
- Check fail in `tf.raw_ops.MaxPoolGradWithArgmax` HOT 1
- Aborted (core dumped) in `tf.raw_ops.NearestNeighbors`
- Aborted (core dumped) in `tf.raw_ops.SparseBincount`
- Aborted (core dumped) in `TensorScatterOp` HOT 1
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.