pypi Keras 3.7.0
Keras 3.7.0

15 days ago

API changes

  • Add flash_attention argument to keras.ops.dot_product_attention and to keras.layers.MultiHeadAttention.
  • Add keras.layers.STFTSpectrogram layer (to extract STFT spectrograms from inputs as a preprocessing step) as well as its initializer keras.initializers.STFTInitializer.
  • Add celu, glu, log_sigmoid, hard_tanh, hard_shrink, squareplus activations.
  • Add keras.losses.Circle loss.
  • Add image visualization utilities keras.visualization.draw_bounding_boxes, keras.visualization.draw_segmentation_masks, keras.visualization.plot_image_gallery, keras.visualization.plot_segmentation_mask_gallery.
  • Add double_checkpoint argument to BackupAndRestore to save a fallback checkpoint in case the first checkpoint gets corrupted.
  • Add bounding box preprocessing support to image augmentation layers CenterCrop, RandomFlip, RandomZoom, RandomTranslation, RandomCrop.
  • Add keras.ops.exp2, keras.ops.inner operations.

Performance improvements

  • JAX backend: add native Flash Attention support for GPU (via cuDNN) and TPU (via a Pallas kernel). Flash Attention is now used automatically when the hardware supports it.
  • PyTorch backend: add native Flash Attention support for GPU (via cuDNN). It is currently opt-in.
  • TensorFlow backend: enable more kernel fusion via bias_add.
  • PyTorch backend: add support for Intel XPU devices.

New Contributors

Full Changelog: v3.6.0...v3.7.0

Don't miss a new Keras release

NewReleases is sending notifications on new releases.