Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retether-3.5.0 #1468

Merged
merged 37 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
4a7baa6
doc tweaks
t-kalinowski Sep 4, 2024
c686ba6
Document better `gradient_accumulation_steps` arg in Optimizers
t-kalinowski Sep 4, 2024
ce513cc
doc tweaks
t-kalinowski Sep 4, 2024
187a1ed
redocument
t-kalinowski Sep 4, 2024
bfca348
tensor attr `sparse` now defaults to `FALSE` instead of `NULL`
t-kalinowski Sep 4, 2024
d8a0947
random number / numerical differences
t-kalinowski Sep 4, 2024
f6d4792
IOU metrics `update_state()` method now returns updated internal stat…
t-kalinowski Sep 4, 2024
c2b5c46
redocument
t-kalinowski Sep 4, 2024
3c9ac9d
minor doc tweaks to ops
t-kalinowski Sep 4, 2024
16053c1
redocument
t-kalinowski Sep 4, 2024
348a839
doc tweak
t-kalinowski Sep 4, 2024
9f1db42
losses now accept `DTypePolicy()` objects for `dtype` arg
t-kalinowski Sep 4, 2024
e3a8468
doc tweaks: `layer_conv_{2,3}d`
t-kalinowski Sep 4, 2024
43d0bc1
redocument
t-kalinowski Sep 4, 2024
773db1e
doc tweak: layer_string_lookup
t-kalinowski Sep 4, 2024
1fce768
`layer_zero_padding_1d` takes `data_format` arg; doc improvements
t-kalinowski Sep 4, 2024
cdc78aa
redocument
t-kalinowski Sep 4, 2024
87bf915
`Metric$initialize` now accepts `DTypePolicy` for `dtype`
t-kalinowski Sep 4, 2024
1e291cb
`Loss` init now accepts DTypePolicy
t-kalinowski Sep 4, 2024
0325618
updates to `quantize()`: `...` passed on, `type_check` arg, `Embeddin…
t-kalinowski Sep 4, 2024
2fc8ab7
`save_model` gains hugging face support
t-kalinowski Sep 4, 2024
42bcfc9
doc tweaks to `keras_input()`
t-kalinowski Sep 4, 2024
4efe631
redocument
t-kalinowski Sep 4, 2024
cd1a1d4
internal / module-level changes
t-kalinowski Sep 4, 2024
bf076da
redocument
t-kalinowski Sep 4, 2024
9b00664
add `op_associative_scan()`
t-kalinowski Sep 4, 2024
ce23ca0
add `op_searchsorted()`
t-kalinowski Sep 4, 2024
d638d19
add `optimizer_lamb()`
t-kalinowski Sep 4, 2024
69879ef
redocument
t-kalinowski Sep 4, 2024
6d2bac1
add `@family` tags for `op_associative_scan` and `op_searchsorted`
t-kalinowski Sep 4, 2024
82a7e34
add missing `@family` tag for `optimizer_lamb()`
t-kalinowski Sep 4, 2024
510059e
rebuild site
t-kalinowski Sep 4, 2024
0968240
add NEWS
t-kalinowski Sep 4, 2024
83964e6
rebuild site
t-kalinowski Sep 4, 2024
7a02a57
reknit guides
t-kalinowski Sep 4, 2024
93cd4a9
reknit examples
t-kalinowski Sep 4, 2024
73a3617
rebuild site
t-kalinowski Sep 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
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
Loading