Skip to content

Commit f1e3ff8

Browse files
authored
Merge pull request #1517 from rstudio/retether-3-11-3-take2
Retether Keras to v3.11.3
2 parents 8f434af + 8790244 commit f1e3ff8

File tree

1,500 files changed

+23739
-4147
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,500 files changed

+23739
-4147
lines changed

.tether/man/Layer.txt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Help on class Layer in module keras.src.layers.layer:
22

3-
class Layer(keras.src.backend.tensorflow.layer.TFLayer, keras.src.ops.operation.Operation, keras.src.saving.keras_saveable.KerasSaveable)
3+
class Layer(keras.src.backend.tensorflow.layer.TFLayer, keras.src.ops.operation.Operation)
44
| Layer(*args, **kwargs)
55
|
66
| This is the class from which all layers inherit.
@@ -243,6 +243,7 @@ class Layer(keras.src.backend.tensorflow.layer.TFLayer, keras.src.ops.operation.
243243
| regularizer=None,
244244
| constraint=None,
245245
| aggregation='none',
246+
| overwrite_with_gradient=False,
246247
| name=None
247248
| )
248249
| Add a weight variable to the layer.
@@ -274,6 +275,9 @@ class Layer(keras.src.backend.tensorflow.layer.TFLayer, keras.src.ops.operation.
274275
| the type of multi-replica aggregation to be used for this
275276
| variable when writing custom data parallel training loops.
276277
| Defaults to `"none"`.
278+
| overwrite_with_gradient: Boolean, whether to overwrite the variable
279+
| with the computed gradient. This is useful for float8 training.
280+
| Defaults to `False`.
277281
| name: String name of the variable. Useful for debugging purposes.
278282
|
279283
| build(self, input_shape)
@@ -448,6 +452,12 @@ class Layer(keras.src.backend.tensorflow.layer.TFLayer, keras.src.ops.operation.
448452
| ref_var.assign(value)
449453
| ```
450454
|
455+
| symbolic_call(
456+
| self,
457+
| *args,
458+
| **kwargs
459+
| )
460+
|
451461
| ----------------------------------------------------------------------
452462
| Static methods defined here:
453463
|

.tether/man/activation_elu.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ and the information that is propagated to the next layer.
1919

2020
Args:
2121
x: Input tensor.
22+
alpha: A scalar, slope of positive section. Defaults to `1.0`.
2223

2324
Reference:
2425

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
__signature__
2+
keras.activations.sparse_sigmoid(x)
3+
__doc__
4+
Sparse sigmoid activation function.
5+
6+
It is defined as
7+
8+
`f(x) = 0` for `x <= -1`,
9+
`f(x) = 0.5 * (x + 1)` for `-1 < x < 1`,
10+
`f(x) = 1` for `x >= 1`.
11+
12+
Args:
13+
x: Input tensor.
14+
15+
Reference:
16+
17+
- [M. Blondel, A. F. T. Martins, V. Niculae, 2019](https://arxiv.org/pdf/1901.02324)
18+

.tether/man/callback_early_stopping.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Help on class EarlyStopping in module keras.src.callbacks.early_stopping:
22

3-
class EarlyStopping(keras.src.callbacks.callback.Callback)
3+
class EarlyStopping(keras.src.callbacks.monitor_callback.MonitorCallback)
44
| EarlyStopping(monitor='val_loss', min_delta=0, patience=0, verbose=0, mode='auto', baseline=None, restore_best_weights=False, start_from_epoch=0)
55
|
66
| Stop training when a monitored metric has stopped improving.
@@ -60,6 +60,7 @@ class EarlyStopping(keras.src.callbacks.callback.Callback)
6060
|
6161
| Method resolution order:
6262
| EarlyStopping
63+
| keras.src.callbacks.monitor_callback.MonitorCallback
6364
| keras.src.callbacks.callback.Callback
6465
| builtins.object
6566
|

.tether/man/callback_lambda.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ class LambdaCallback(keras.src.callbacks.callback.Callback)
1313
| `epoch`, `logs`
1414
| - `on_train_begin` and `on_train_end` expect one positional argument:
1515
| `logs`
16-
| - `on_train_batch_begin` and `on_train_batch_end` expect two positional
17-
| arguments: `batch`, `logs`
16+
| - `on_train_batch_begin` and `on_train_batch_end` expect a positional
17+
| argument `batch` and a keyword argument `logs`
1818
| - See `Callback` class definition for the full list of functions and their
1919
| expected arguments.
2020
|
@@ -79,3 +79,4 @@ class LambdaCallback(keras.src.callbacks.callback.Callback)
7979
| )
8080
| Initialize self. See help(type(self)) for accurate signature.
8181
|
82+

.tether/man/callback_model_checkpoint.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Help on class ModelCheckpoint in module keras.src.callbacks.model_checkpoint:
22

3-
class ModelCheckpoint(keras.src.callbacks.callback.Callback)
3+
class ModelCheckpoint(keras.src.callbacks.monitor_callback.MonitorCallback)
44
| ModelCheckpoint(filepath, monitor='val_loss', verbose=0, save_best_only=False, save_weights_only=False, mode='auto', save_freq='epoch', initial_value_threshold=None)
55
|
66
| Callback to save the Keras model or model weights at some frequency.
@@ -95,9 +95,8 @@ class ModelCheckpoint(keras.src.callbacks.callback.Callback)
9595
| decision to overwrite the current save file is made based on either
9696
| the maximization or the minimization of the monitored quantity.
9797
| For `val_acc`, this should be `"max"`, for `val_loss` this should be
98-
| `"min"`, etc. In `"auto"` mode, the mode is set to `"max"` if the
99-
| quantities monitored are `"acc"` or start with `"fmeasure"` and are
100-
| set to `"min"` for the rest of the quantities.
98+
| `"min"`, etc. In `"auto"` mode, the direction is automatically
99+
| inferred from the name of the monitored quantity.
101100
| save_weights_only: if `True`, then only the model's weights will be
102101
| saved (`model.save_weights(filepath)`), else the full model is
103102
| saved (`model.save(filepath)`).
@@ -116,6 +115,7 @@ class ModelCheckpoint(keras.src.callbacks.callback.Callback)
116115
|
117116
| Method resolution order:
118117
| ModelCheckpoint
118+
| keras.src.callbacks.monitor_callback.MonitorCallback
119119
| keras.src.callbacks.callback.Callback
120120
| builtins.object
121121
|

.tether/man/callback_reduce_lr_on_plateau.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Help on class ReduceLROnPlateau in module keras.src.callbacks.reduce_lr_on_plateau:
22

3-
class ReduceLROnPlateau(keras.src.callbacks.callback.Callback)
3+
class ReduceLROnPlateau(keras.src.callbacks.monitor_callback.MonitorCallback)
44
| ReduceLROnPlateau(monitor='val_loss', factor=0.1, patience=10, verbose=0, mode='auto', min_delta=0.0001, cooldown=0, min_lr=0.0, **kwargs)
55
|
66
| Reduce learning rate when a metric has stopped improving.
@@ -39,6 +39,7 @@ class ReduceLROnPlateau(keras.src.callbacks.callback.Callback)
3939
|
4040
| Method resolution order:
4141
| ReduceLROnPlateau
42+
| keras.src.callbacks.monitor_callback.MonitorCallback
4243
| keras.src.callbacks.callback.Callback
4344
| builtins.object
4445
|
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
__signature__
2+
keras.config.is_nnx_enabled()
3+
__doc__
4+
Checks whether NNX specific features are enabled for the JAX backend.
5+
6+
Returns:
7+
bool: `True` if NNX backend features are enabled, `False` otherwise.
8+
Defaults to `False`.
9+

.tether/man/config_max_epochs.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
__signature__
2+
keras.config.max_epochs()
3+
__doc__
4+
Get the maximum number of epochs for any call to fit.
5+
6+
Retrieves the limit on the number of epochs set by
7+
`keras.config.set_max_epochs` or the `KERAS_MAX_EPOCHS` environment
8+
variable.
9+
10+
Returns:
11+
The integer limit on the number of epochs or `None`, if no limit has
12+
been set.
13+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
__signature__
2+
keras.config.max_steps_per_epoch()
3+
__doc__
4+
Get the maximum number of steps for any call to fit/evaluate/predict.
5+
6+
Retrieves the limit on the number of epochs set by
7+
`keras.config.set_max_steps_per_epoch` or the `KERAS_MAX_STEPS_PER_EPOCH`
8+
environment variable.
9+
10+
Args:
11+
max_epochs: The integer limit on the number of epochs or `None`. If
12+
`None`, no limit is applied.
13+

0 commit comments

Comments
 (0)