keras 2.8.0
-
Breaking change: The semantics of passing a named list to
keras_model()have changed.Previously,
keras_model()wouldunname()suppliedinputsandoutputs.
Then, if a named list was passed to subsequentfit()/evaluate()/call()/predict()invocations, matching ofxandywas done to the model's input and outpttensor$name's.
Now, matching is done tonames()ofinputsand/oroutputssupplied tokeras_model().
Callunname()oninputsandoutputsto restore the old behavior, e.g.:keras_model(unname(inputs), unname(outputs))keras_model()can now accept a named list for multi-input and/or multi-output
models. The named list is converted to adictin python.
(Requires Tensorflow >= 2.4, Python >= 3.7).If
inputsis a named list:call(),fit(),evaluate(), andpredict()methods can also
accept a named list forx, with names matching to the
names ofinputswhen the model was constructed.
Positional matching ofxis still also supported (requires python 3.7+).
If
outputsis a named list:fit()andevaluate()methods can only
accept a named list fory, with names matching to the
names ofoutputswhen the model was constructed.
-
New layer
layer_depthwise_conv_1d(). -
Models gain
format()andprint()S3 methods for compatibility
with the latest reticulate. Both are powered bymodel$summary(). -
summary()method for Models gains argumentsexpand_nestedandshow_trainable,
both default toFALSE. -
keras_model_custom()is soft deprecated. Please define custom models by
subclassingkeras$Modeldirectly using%py_class%orR6::R6Class(). -
Fixed warning issued by
k_random_binomial(). -
Fixed error raised when
k_random_binomial()was passed a non-floating dtype. -
Added
k_random_bernouli()as an alias fork_random_binomial(). -
image_load()gains acolor_modeargument. -
Fixed issue where
create_layer_wrapper()would not include arguments
with aNULLdefault value in the returned wrapper. -
Fixed issue in
r_to_py.R6ClassGenerator(and%py_class%) where
single-expressioninitializefunctions defined without{would error. -
Deprecated functions are no longer included in the package documentation index.