Skip to content

Commit

Permalink
Merge pull request #1468 from rstudio/retether-3.5.0
Browse files Browse the repository at this point in the history
Retether-3.5.0
  • Loading branch information
t-kalinowski authored Sep 4, 2024
2 parents 64cd480 + 73a3617 commit c7827bd
Show file tree
Hide file tree
Showing 1,106 changed files with 5,517 additions and 3,180 deletions.
2 changes: 2 additions & 0 deletions .tether/man/InputLayer.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ class InputLayer(keras.src.layers.layer.Layer)
| ----------------------------------------------------------------------
| Readonly properties defined here:
|
| batch_shape
|
| dtype
| Alias of `layer.variable_dtype`.
|
Expand Down
21 changes: 19 additions & 2 deletions .tether/man/Layer.txt
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ class Layer(keras.src.backend.tensorflow.layer.TFLayer, keras.src.ops.operation.
| )
| Call self as a function.
|
| __delattr__(self, name)
| Implement delattr(self, name).
|
| __init__(
| self,
| *,
Expand Down Expand Up @@ -211,7 +214,11 @@ class Layer(keras.src.backend.tensorflow.layer.TFLayer, keras.src.ops.operation.
| return x
| ```
|
| add_metric(self)
| add_metric(
| self,
| *args,
| **kwargs
| )
|
| add_variable(
| self,
Expand Down Expand Up @@ -347,7 +354,17 @@ class Layer(keras.src.backend.tensorflow.layer.TFLayer, keras.src.ops.operation.
| Args:
| store: Dict from which the state of the model will be loaded.
|
| quantize(self, mode)
| quantize(
| self,
| mode,
| type_check=True
| )
|
| quantized_build(
| self,
| input_shape,
| mode
| )
|
| quantized_call(
| self,
Expand Down
16 changes: 16 additions & 0 deletions .tether/man/Loss.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@ class Loss(keras.src.saving.keras_saveable.KerasSaveable)
|
| Loss base class.
|
| Args:
| reduction: Type of reduction to apply to the loss. In almost all cases
| this should be `"sum_over_batch_size"`.
| Supported options are `"sum"`, `"sum_over_batch_size"` or `None`.
| name: Optional name for the loss instance.
| dtype: The dtype of the loss's computations. Defaults to `None`, which
| means using `keras.backend.floatx()`. `keras.backend.floatx()` is a
| `"float32"` unless set to different value
| (via `keras.backend.set_floatx()`). If a `keras.DTypePolicy` is
| provided, then the `compute_dtype` will be utilized.
|
| To be implemented by subclasses:
|
| * `call()`: Contains the logic for loss calculation using `y_true`,
Expand Down Expand Up @@ -54,4 +65,9 @@ class Loss(keras.src.saving.keras_saveable.KerasSaveable)
|
| from_config(config)
|
| ----------------------------------------------------------------------
| Readonly properties defined here:
|
| dtype
|

8 changes: 6 additions & 2 deletions .tether/man/Metric.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@ class Metric(keras.src.saving.keras_saveable.KerasSaveable)
| Encapsulates metric logic and state.
|
| Args:
| name: (Optional) string name of the metric instance.
| dtype: (Optional) data type of the metric result.
| name: Optional name for the metric instance.
| dtype: The dtype of the metric's computations. Defaults to `None`, which
| means using `keras.backend.floatx()`. `keras.backend.floatx()` is a
| `"float32"` unless set to different value
| (via `keras.backend.set_floatx()`). If a `keras.DTypePolicy` is
| provided, then the `compute_dtype` will be utilized.
|
| Example:
|
Expand Down
3 changes: 2 additions & 1 deletion .tether/man/audio_dataset_from_directory.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,9 @@ Args:
length of the longest sequence in the batch.
ragged: Whether to return a Ragged dataset (where each sequence has its
own length). Defaults to `False`.
shuffle: Whether to shuffle the data. Defaults to `True`.
shuffle: Whether to shuffle the data.
If set to `False`, sorts the data in alphanumeric order.
Defaults to `True`.
seed: Optional random seed for shuffling and transformations.
validation_split: Optional float between 0 and 1, fraction of data to
reserve for validation.
Expand Down
4 changes: 2 additions & 2 deletions .tether/man/callback_backup_and_restore.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ class BackupAndRestore(keras.src.callbacks.callback.Callback)
| When set to an integer, the callback saves the checkpoint every
| `save_freq` batches. Set `save_freq=False` only if using
| preemption checkpointing (i.e. with `save_before_preemption=True`).
| delete_checkpoint: Boolean, defaults to `True`. This `BackupAndRestore`
| delete_checkpoint: Boolean. This `BackupAndRestore`
| callback works by saving a checkpoint to back up the training state.
| If `delete_checkpoint=True`, the checkpoint will be deleted after
| training is finished. Use `False` if you'd like to keep the checkpoint
| for future usage.
| for future usage. Defaults to `True`.
|
| Method resolution order:
| BackupAndRestore
Expand Down
11 changes: 6 additions & 5 deletions .tether/man/image_dataset_from_directory.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ Args:
(must match names of subdirectories). Used to control the order
of the classes (otherwise alphanumerical order is used).
color_mode: One of `"grayscale"`, `"rgb"`, `"rgba"`.
Defaults to `"rgb"`. Whether the images will be converted to
have 1, 3, or 4 channels.
Whether the images will be converted to
have 1, 3, or 4 channels. Defaults to `"rgb"`.
batch_size: Size of the batches of data. Defaults to 32.
If `None`, the data will not be batched
(the dataset will yield individual samples).
image_size: Size to resize images to after they are read from disk,
specified as `(height, width)`. Defaults to `(256, 256)`.
specified as `(height, width)`.
Since the pipeline processes batches of images that must all have
the same size, this must be provided.
the same size, this must be provided. Defaults to `(256, 256)`.
shuffle: Whether to shuffle the data. Defaults to `True`.
If set to `False`, sorts the data in alphanumeric order.
seed: Optional random seed for shuffling and transformations.
Expand All @@ -88,9 +88,10 @@ Args:
When `subset="both"`, the utility returns a tuple of two datasets
(the training and validation datasets respectively).
interpolation: String, the interpolation method used when
resizing images. Defaults to `"bilinear"`.
resizing images.
Supports `"bilinear"`, `"nearest"`, `"bicubic"`, `"area"`,
`"lanczos3"`, `"lanczos5"`, `"gaussian"`, `"mitchellcubic"`.
Defaults to `"bilinear"`.
follow_links: Whether to visit subdirectories pointed to by symlinks.
Defaults to `False`.
crop_to_aspect_ratio: If `True`, resize the images without aspect
Expand Down
7 changes: 4 additions & 3 deletions .tether/man/image_smart_resize.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ Args:
or `(batch_size, height, width, channels)`.
size: Tuple of `(height, width)` integer. Target size.
interpolation: String, interpolation to use for resizing.
Defaults to `'bilinear'`.
Supports `bilinear`, `nearest`, `bicubic`,
`lanczos3`, `lanczos5`.
Supports `"bilinear"`, `"nearest"`, `"bicubic"`,
`"lanczos3"`, `"lanczos5"`.
Defaults to `"bilinear"`.
data_format: `"channels_last"` or `"channels_first"`.
backend_module: Backend module to use (if different from the default
backend).
Expand All @@ -68,3 +68,4 @@ Returns:
If the input image was a NumPy array, the output is a NumPy array,
and if it was a backend-native tensor,
the output is a backend-native tensor.

6 changes: 5 additions & 1 deletion .tether/man/keras.distribution.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
DataParallel(device_mesh=None, devices=None)
DataParallel(
device_mesh=None,
devices=None,
auto_shard_dataset=True
)
DeviceMesh(
shape,
axis_names,
Expand Down
6 changes: 5 additions & 1 deletion .tether/man/keras.layers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1247,7 +1247,11 @@ UpSampling3D(
**kwargs
)
Wrapper(layer, **kwargs)
ZeroPadding1D(padding=1, **kwargs)
ZeroPadding1D(
padding=1,
data_format=None,
**kwargs
)
ZeroPadding2D(
padding=(1, 1),
data_format=None,
Expand Down
2 changes: 1 addition & 1 deletion .tether/man/keras.models.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ save_model(
model,
filepath,
overwrite=True,
zipped=True,
zipped=None,
**kwargs
)
Sequential(*args, **kwargs)
Expand Down
11 changes: 11 additions & 0 deletions .tether/man/keras.ops.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ argpartition(
)
argsort(x, axis=-1)
array(x, dtype=None)
associative_scan(
f,
elems,
reverse=False,
axis=0
)
average(
x,
axis=None,
Expand Down Expand Up @@ -480,6 +486,11 @@ scatter_update(
indices,
updates
)
searchsorted(
sorted_sequence,
values,
side='left'
)
segment_max(
data,
segment_ids,
Expand Down
17 changes: 17 additions & 0 deletions .tether/man/keras.optimizers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,23 @@ Ftrl(
**kwargs
)
get(identifier)
Lamb(
learning_rate=0.001,
beta_1=0.9,
beta_2=0.999,
epsilon=1e-07,
weight_decay=None,
clipnorm=None,
clipvalue=None,
global_clipnorm=None,
use_ema=False,
ema_momentum=0.99,
ema_overwrite_frequency=None,
loss_scale_factor=None,
gradient_accumulation_steps=None,
name='lamb',
**kwargs
)
legacy: Module(keras.api.optimizers.legacy)
Lion(
learning_rate=0.001,
Expand Down
3 changes: 2 additions & 1 deletion .tether/man/keras.quantizers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ abs_max_quantize(
axis,
value_range=(-127, 127),
dtype='int8',
epsilon=1e-07
epsilon=1e-07,
to_numpy=False
)
AbsMaxQuantizer(
axis,
Expand Down
2 changes: 1 addition & 1 deletion .tether/man/keras.saving.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ save_model(
model,
filepath,
overwrite=True,
zipped=True,
zipped=None,
**kwargs
)
save_weights(
Expand Down
1 change: 1 addition & 0 deletions .tether/man/keras.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ StatelessScope(
collect_losses=False,
initialize_variables=True
)
SymbolicScope()
tree: Module(keras.api.tree)
utils: Module(keras.api.utils)
Variable(
Expand Down
2 changes: 2 additions & 0 deletions .tether/man/keras_input.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ Args:
be passed into the input - they will be densified with a default
value of 0. This feature is only supported with the TensorFlow
backend. Defaults to `False`.
batch_shape: Optional shape tuple (tuple of integers or `None` objects),
including the batch size.
name: Optional name string for the layer.
Should be unique in a model (do not reuse the same name twice).
It will be autogenerated if it isn't provided.
Expand Down
12 changes: 9 additions & 3 deletions .tether/man/keras_model.txt
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,11 @@ class Model(keras.src.backend.tensorflow.trainer.TensorFlowTrainer, keras.src.tr
| there is a mismatch in the number of weights, or a mismatch in
| the shape of the weights.
|
| quantize(self, mode)
| quantize(
| self,
| mode,
| **kwargs
| )
| Quantize the weights of the model.
|
| Note that the model must be built first before calling this method.
Expand All @@ -246,7 +250,7 @@ class Model(keras.src.backend.tensorflow.trainer.TensorFlowTrainer, keras.src.tr
| self,
| filepath,
| overwrite=True,
| zipped=True,
| zipped=None,
| **kwargs
| )
| Saves a model as a `.keras` file.
Expand All @@ -260,7 +264,9 @@ class Model(keras.src.backend.tensorflow.trainer.TensorFlowTrainer, keras.src.tr
| the target location, or instead ask the user via
| an interactive prompt.
| zipped: Whether to save the model as a zipped `.keras`
| archive (default), or as an unzipped directory.
| archive (default when saving locally), or as an
| unzipped directory (default when saving on the
| Hugging Face Hub).
|
| Example:
|
Expand Down
8 changes: 4 additions & 4 deletions .tether/man/layer_conv_2d.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ class Conv2D(keras.src.layers.convolutional.base_conv.BaseConv)
| 2D convolution layer.
|
| This layer creates a convolution kernel that is convolved with the layer
| input over a single spatial (or temporal) dimension to produce a tensor of
| outputs. If `use_bias` is True, a bias vector is created and added to the
| outputs. Finally, if `activation` is not `None`, it is applied to the
| outputs as well.
| input over a 2D spatial (or temporal) dimension (height and width) to
| produce a tensor of outputs. If `use_bias` is True, a bias vector is created
| and added to the outputs. Finally, if `activation` is not `None`, it is
| applied to the outputs as well.
|
| Args:
| filters: int, the dimension of the output space (the number of filters
Expand Down
8 changes: 4 additions & 4 deletions .tether/man/layer_conv_3d.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ class Conv3D(keras.src.layers.convolutional.base_conv.BaseConv)
| 3D convolution layer.
|
| This layer creates a convolution kernel that is convolved with the layer
| input over a single spatial (or temporal) dimension to produce a tensor of
| outputs. If `use_bias` is True, a bias vector is created and added to the
| outputs. Finally, if `activation` is not `None`, it is applied to the
| outputs as well.
| input over a 3D spatial (or temporal) dimension (width,height and depth) to
| produce a tensor of outputs. If `use_bias` is True, a bias vector is created
| and added to the outputs. Finally, if `activation` is not `None`, it is
| applied to the outputs as well.
|
| Args:
| filters: int, the dimension of the output space (the number of filters
Expand Down
12 changes: 5 additions & 7 deletions .tether/man/layer_dense.txt
Original file line number Diff line number Diff line change
Expand Up @@ -119,20 +119,18 @@ class Dense(keras.src.layers.layer.Layer)
| Args:
| store: Dict from which the state of the model will be loaded.
|
| quantize(self, mode)
| quantize(
| self,
| mode,
| type_check=True
| )
|
| quantized_build(
| self,
| input_shape,
| mode
| )
|
| quantized_call(
| self,
| inputs,
| training=None
| )
|
| save_own_variables(self, store)
| Saves the state of the layer.
|
Expand Down
Loading

0 comments on commit c7827bd

Please sign in to comment.