Skip to content

Keras Release 2.8.0 RC0

Pre-release
Pre-release

Choose a tag to compare

@qlzh727 qlzh727 released this 22 Dec 18:26
· 1 commit to r2.8 since this release

Please see https://github.com/tensorflow/tensorflow/blob/r2.8/RELEASE.md for Keras release notes.

  • tf.keras:
    • Preprocessing Layers
      • Added a tf.keras.layers.experimental.preprocessing.HashedCrossing
        layer which applies the hashing trick to the concatenation of crossed
        scalar inputs. This provides a stateless way to try adding feature crosses
        of integer or string data to a model.
      • Removed keras.layers.experimental.preprocessing.CategoryCrossing. Users
        should migrate to the HashedCrossing layer or use
        tf.sparse.cross/tf.ragged.cross directly.
      • Added additional standardize and split modes to TextVectorization.
        • standardize="lower" will lowercase inputs.
        • standardize="string_punctuation" will remove all puncuation.
        • split="character" will split on every unicode character.
      • Added an output_mode argument to the Discretization and Hashing
        layers with the same semantics as other preprocessing layers. All
        categorical preprocessing layers now support output_mode.
      • All preprocessing layer output will follow the compute dtype of a
        tf.keras.mixed_precision.Policy, unless constructed with
        output_mode="int" in which case output will be tf.int64.
        The output type of any preprocessing layer can be controlled individually
        by passing a dtype argument to the layer.
    • tf.random.Generator for keras initializers and all RNG code.
      • Added 3 new APIs for enable/disable/check the usage of
        tf.random.Generator in keras backend, which will be the new backend for
        all the RNG in Keras. We plan to switch on the new code path by default in
        tf 2.8, and the behavior change will likely to cause some breakage on user
        side (eg if the test is checking against some golden nubmer). These 3 APIs
        will allow user to disable and switch back to legacy behavior if they
        prefer. In future (eg tf 2.10), we expect to totally remove the legacy
        code path (stateful random Ops), and these 3 APIs will be removed as well.
    • tf.keras.callbacks.experimental.BackupAndRestore is now available as
      tf.keras.callbacks.BackupAndRestore. The experimental endpoint is
      deprecated and will be removed in a future release.
    • tf.keras.experimental.SidecarEvaluator is now available as
      tf.keras.utils.SidecarEvaluator. The experimental endpoint is
      deprecated and will be removed in a future release.
    • Metrics update and collection logic in default Model.train_step() is now
      customizable via overriding Model.compute_metrics().
    • Losses computation logic in default Model.train_step() is now
      customizable via overriding Model.compute_loss().
    • jit_compile added to Model.compile() on an opt-in basis to compile the
      model's training step with XLA. Note that
      jit_compile=True may not necessarily work for all models.

What's Changed

New Contributors

Full Changelog: v2.7.0-rc0...v2.8.0-rc0