Changelog
Source:NEWS.md
keras3 1.2.0
-
Added compatibility with Keras v3.5.0. User facing changes:
- New functions:
-
keras$DTypePolicy
instances can now be supplied todtype
argument for losses, metrics, and layers. - Add integration with the Hugging Face Hub. You can now save models to Hugging Face Hub directly
save_model()
and load .keras models directly from Hugging Face Hub withload_model()
. - Added compatibility with NumPy 2.0.
- Improved
keras$distribution
API support for very large models. - Bug fixes and performance improvements.
- Add
data_format
argument tolayer_zero_padding_1d()
layer. - Miscellaneous documentation improvements.
- Bug fixes and performance improvements.
keras3 1.1.0
CRAN release: 2024-07-17
Fixed issue where GPUs would not be found when running on Windows under WSL Linux. (reported in #1456, fixed in #1459)
keras_shape
objects (as returned bykeras3::shape()
) gain==
and!=
methods.Fixed warning from
tfruns::training_run()
being unable to log optimizer learning rate.Added compatibility with Keras v3.4.1 (no R user facing changes).
-
Added compatibility with Keras v3.4.0. User facing changes:
- New functions:
- Changes:
- Added support for arbitrary, deeply nested input/output structures in Functional models (e.g. lists of lists of lists of inputs or outputs…)
- Add support for
optional
Functional inputs.-
keras_input()
gains anoptional
argument. -
keras_model_sequential()
gains ainput_optional
argument.
-
- Add support for
float8
inference forDense
andEinsumDense
layers. - Enable
layer_feature_space()
to be used in a tfdatasets pipeline even when the backend isn’t TensorFlow. -
layer_string_lookup()
can now taketf$SparseTensor()
as input. -
layer_string_lookup()
returns"int64"
dtype by default in more modes now. -
Layer()
instances gain attributespath
andquantization_mode
. -
Metric()$variables
is now recursive. - Add
training
argument toModel$compute_loss()
. -
split_dataset()
now supports nested structures in dataset. - All applications gain a
name
argument, accept a custom name. -
layer_multi_head_attention()
gains aseed
argument. - All losses gain a
dtype
argument. -
loss_dice()
gains anaxis
argument. -
op_ctc_decode()
, new default formask_index = 0
- All
op_image_*
functions now use defaultdata_format
value toconfig_image_data_format()
-
op_isclose()
gains argumentsrtol
,atol
,equal_nan
. -
save_model()
gains argumentzipped
. - Bugs fixes and performance improvements.
keras3 1.0.0
CRAN release: 2024-05-21
Chains of
layer_*
calls with|>
now instantiate layers in the same order as%>%
pipe chains: left-hand-side first (#1440).iterate()
,iter_next()
andas_iterator()
are now reexported from reticulate.
User facing changes with upstream Keras v3.3.3:
new functions:
op_slogdet()
,op_psnr()
clone_model()
gains new args:call_function
,recursive
Updated example usage.op_ctc_decode()
strategy argument has new default:"greedy"
. Updated docs.loss_ctc()
default name fixed, changed to"ctc"
User facing changes with upstream Keras v3.3.2:
new function:
op_ctc_decode()
new function:
op_eigh()
new function:
op_select()
new function:
op_vectorize()
new function:
op_image_rgb_to_grayscale()
new function:
loss_tversky()
new args:
layer_resizing(pad_to_aspect_ratio, fill_mode, fill_value)
new arg:
layer_embedding(weights)
for providing an initial weights matrixnew args:
op_nan_to_num(nan, posinf, neginf)
new args:
op_image_resize(crop_to_aspect_ratio, pad_to_aspect_ratio, fill_mode, fill_value)
new args:
op_argmax(keepdims)
andop_argmin(keepdims)
new arg:
clear_session(free_memory)
for clearing without invoking the garbage collector.metric_kl_divergence()
andloss_kl_divergence()
clip inputs (y_true
andy_pred
) to the[0, 1]
range.new
Layer()
attributes:metrics
,dtype_policy
Added initial support for float8 training
layer_conv_*d()
layers now support LoRaop_digitize()
now supports sparse tensors.Models and layers now return owned metrics recursively.
Add pickling support for Keras models. (e.g., via
reticulate::py_save_object()
) Note that pickling is not recommended, prefer using Keras saving APIs.
keras3 0.2.0
CRAN release: 2024-04-18
New functions:
quantize_weights()
: quantize model or layer weights in-place. Currently, onlyDense
,EinsumDense
, andEmbedding
layers are supported (which is enough to cover the majority of transformers today)config_set_backend()
: change the backend after Keras has initialized.-
New Ops
-
New family of linear algebra ops
audio_dataset_from_directory()
,image_dataset_from_directory()
andtext_dataset_from_directory()
gain averbose
argument (defaultTRUE
)image_dataset_from_directory()
gainspad_to_aspect_ratio
argument (defaultFALSE
)to_categorical()
,op_one_hot()
, andfit()
can now accept R factors, offset them to be 0-based (reported in#1055
).op_convert_to_numpy()
now returns unconverted NumPy arrays.op_array()
andop_convert_to_tensor()
no longer error when casting R doubles to integer types.export_savedmodel()
now works with a Jax backend.Metric()$add_variable()
method gains arg:aggregration
.Layer()$add_weight()
method gains args:autocast
,regularizer
,aggregation
.op_bincount()
,op_multi_hot()
,op_one_hot()
, andlayer_category_encoding()
now support sparse tensors.op_custom_gradient()
now supports the PyTorch backendlayer_lstm()
andlayer_gru()
gain arguse_cudnn
, default'auto'
.Fixed an issue where
application_preprocess_inputs()
would error if supplied an R array as input.Doc improvements.
keras3 0.1.0
CRAN release: 2024-02-17
- The package has been rebuilt for Keras 3.0. Refer to https://blogs.rstudio.com/ai/posts/2024-05-21-keras3/ for an overview and https://keras3.posit.co for the current up-to-date documentation.