Keras v2.2.5 Release Notes

Release Date: 2019-08-22 // over 4 years ago
  • ๐Ÿš€ Keras 2.2.5 is the last release of Keras that implements the 2.2.* API. It is the last release to only support TensorFlow 1 (as well as Theano and CNTK).

    ๐Ÿš€ The next release will be 2.3.0, which makes significant API changes and add support for TensorFlow 2.0. The 2.3.0 release will be the last major release of multi-backend Keras. Multi-backend Keras is superseded by tf.keras.

    ๐Ÿ‘ At this time, we recommend that Keras users who use multi-backend Keras with the TensorFlow backend switch to tf.keras in TensorFlow 2.0. tf.keras is better maintained and has better integration with TensorFlow features.

    API Changes

    • โž• Add new Applications: ResNet101, ResNet152, ResNet50V2, ResNet101V2, ResNet152V2.
    • Callbacks: enable callbacks to be passed in evaluate and predict.
      • Add callbacks argument (list of callback instances) in evaluate and predict.
      • Add callback methods on_train_batch_begin, on_train_batch_end, on_test_batch_begin, on_test_batch_end, on_predict_batch_begin, on_predict_batch_end, as well as on_test_begin, on_test_end, on_predict_begin, on_predict_end. Methods on_batch_begin and on_batch_end are now aliases for on_train_batch_begin and on_train_batch_end.
    • Allow file pointers in save_model and load_model (in place of the filepath)
    • โž• Add name argument in Sequential constructor
    • Add validation_freq argument in fit, controlling the frequency of validation (e.g. setting validation_freq=3 would run validation every 3 epochs)
    • ๐Ÿ‘ Allow Python generators (or Keras Sequence objects) to be passed in fit, evaluate, and predict, instead of having to use *_generator methods.
      • Add generator-related arguments max_queue_size, workers, use_multiprocessing to these methods.
    • โž• Add dilation_rate argument in layer DepthwiseConv2D.
    • MaxNorm constraint: rename argument m to max_value.
    • โž• Add dtype argument in base layer (default dtype for layer's weights).
    • Add Google Cloud Storage support for model.save_weights and model.load_weights.
    • โž• Add JSON-serialization to the Tokenizer class.
    • Add H5Dict and model_to_dot to utils.
    • ๐Ÿ‘ Allow default Keras path to be specified at startup via environment variable KERAS_HOME.
    • Add arguments expand_nested, dpi to plot_model.
    • โž• Add update_sub, stack, cumsum, cumprod, foldl, foldr to CNTK backend
    • Add merge_repeated argument to ctc_decode in TensorFlow backend

    ๐Ÿš€ Thanks to the 89 committers who contributed code to this release!