diff --git a/keras/src/saving/saving_lib.py b/keras/src/saving/saving_lib.py index 29b6ecc54d8..9a0506d0391 100644 --- a/keras/src/saving/saving_lib.py +++ b/keras/src/saving/saving_lib.py @@ -511,9 +511,9 @@ def _load_model_from_fileobj(fileobj, custom_objects, compile, safe_mode): def save_weights_only(model, filepath, objects_to_skip=None): - """Save only the weights of a model to a target filepath (.weights.h5). - - Note: only supports h5 for now. + """Save only the weights of a model to a target filepath. + + Supports both `.weights.h5` and `.keras`. """ filepath = str(filepath) tmp_dir = None