Comments (7)
Yes I use my old code, where I save my model in .h5 file not .keras
You don't have to change anything, you just have to iinstall an older version of keras and everything will be OK
from keras-io.
I have the same problem in Kaggle notebook while executing the following code:
history=model1.fit(train_img_datagen, steps_per_epoch=steps_per_epoch, epochs=100, verbose=1, callbacks = [ keras.callbacks.ModelCheckpoint('UNet_100.h5', save_weights_only=False, save_best_only=True, monitor='val_loss', mode='min'), keras.callbacks.ReduceLROnPlateau(), ], validation_data=val_img_datagen, validation_steps=val_steps_per_epoch, )
from keras-io.
@kishan042p I have just solved the problem by installing an older versio of keras:
!pip install keras==2.15.0
import keras
print(keras.version)
But you have to restart your kernel before using it,
Good luck
from keras-io.
@kishan042p I have just solved the problem by installing an older versio of keras:
!pip install keras==2.15.0 import keras print(keras.version)
But you have to restart your kernel before using it,
Good luck
But i Want to save model in .h5 file not in .keras so please provide solution regarding it.
from keras-io.
In Keras 3, for checkpoint filepath, you need to provide in .keras
format only, if you're saving only weights file name should end with .weights.h5
.
You can save and load the model in .h5 using below method
https://keras.io/guides/migrating_to_keras_3/#saving-a-model-in-the-tf-savedmodel-format
from keras-io.
In Keras 3, if you want to save your model in .h5 file in any case, set "save_weights_only=True", and change your flie name to "xxx.weights.h5".
for your code:
CKPT_path = "Model_ckpt.weights.h5"
checkpointing_cb = tf.keras.callbacks.ModelCheckpoint(CKPT_path, save_best_only=True, save_weights_only=True)
from keras-io.
This issue is stale because it has been open for 14 days with no activity. It will be closed if no further activity occurs. Thank you.
from keras-io.
Related Issues (20)
- kerascv layers demonstration HOT 3
- Could not find TensorRT HOT 3
- Error occurred in the Named Entity Recognition using Transformers example HOT 6
- Support Distributed Training for Fine-tuning Stable Diffusion Example HOT 5
- kagglecatsanddogs_5340.zip not available to downoad - image_classification_from_scratch.py HOT 2
- Problem with training yolov8 on TPU
- model not converging the sparse categorical accuracy stays same for the whole epochs. HOT 6
- batch out of range & loss value becomes 'nan' when running monocular depth estimation HOT 6
- How to make individual predictions using the FNet example? HOT 4
- Multi-GPU distributed training with PyTorch
- [Movielens Example] Impossibile to save model: Cannot serialize object Ellipsis HOT 2
- TypeError: Sampler.__call__() got an unexpected keyword argument 'end_token_id' HOT 2
- Hardware requirement for examples/rl/deep_q_network_breakout.py? HOT 5
- bayesian_neural_networks failed with Mixed Precision enabled HOT 3
- Would it be possible to make lstm_seq2seq support mixed precision?
- Will it be a good Idea to add a tutorial to train a Image Classification suing ViT using CLS token. HOT 2
- Cannot export a slightly customized XLMRoberta model from keras_nlp HOT 1
- tutorial bug in consistency_training
- Help runing the lastest version of ".\examples\vision\captcha_ocr.py"
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 keras-io.