Skip to content

Commit 3b67ce7

Browse files
committed
Layer$add_weight() new aggregation strategy
1 parent 7aa79cf commit 3b67ce7

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed

.tether/man/Layer.txt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ class Layer(keras.src.backend.tensorflow.layer.TFLayer, keras.src.ops.operation.
244244
| autocast=True,
245245
| regularizer=None,
246246
| constraint=None,
247-
| aggregation='mean',
247+
| aggregation='none',
248248
| name=None
249249
| )
250250
| Add a weight variable to the layer.
@@ -271,10 +271,11 @@ class Layer(keras.src.backend.tensorflow.layer.TFLayer, keras.src.ops.operation.
271271
| constraint: Contrainst object to call on the variable after any
272272
| optimizer update, or string name of a built-in constraint.
273273
| Defaults to `None`.
274-
| aggregation: String, one of `'mean'`, `'sum'`,
275-
| `'only_first_replica'`. Annotates the variable with the type
276-
| of multi-replica aggregation to be used for this variable
277-
| when writing custom data parallel training loops.
274+
| aggregation: Optional string, one of `None`, `"none"`, `"mean"`,
275+
| `"sum"` or `"only_first_replica"`. Annotates the variable with
276+
| the type of multi-replica aggregation to be used for this
277+
| variable when writing custom data parallel training loops.
278+
| Defaults to `"none"`.
278279
| name: String name of the variable. Useful for debugging purposes.
279280
|
280281
| build(self, input_shape)

.tether/man/keras.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,10 @@ Variable(
8787
dtype=None,
8888
trainable=True,
8989
autocast=True,
90-
aggregation='mean',
90+
aggregation='none',
9191
name=None
9292
)
9393
version()
9494
visualization: Module(keras.api.visualization)
95+
wrappers: Module(keras.api.wrappers)
9596

R/Layer.R

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@
235235
#' autocast = TRUE,
236236
#' regularizer = NULL,
237237
#' constraint = NULL,
238-
#' aggregation = 'mean',
238+
#' aggregation = 'none',
239239
#' name = NULL)
240240
#' ```
241241
#' Add a weight variable to the layer.
@@ -269,10 +269,11 @@
269269
#' variable after any optimizer update,
270270
#' or string name of a built-in constraint.
271271
#' Defaults to `NULL`.
272-
#' * `aggregation`: String, one of `'mean'`, `'sum'`,
273-
#' `'only_first_replica'`. Annotates the variable with the type
274-
#' of multi-replica aggregation to be used for this variable
275-
#' when writing custom data parallel training loops.
272+
#' * `aggregation`: Optional string, one of `NULL`, `"none"`, `"mean"`,
273+
#' `"sum"` or `"only_first_replica"`. Annotates the variable with
274+
#' the type of multi-replica aggregation to be used for this
275+
#' variable when writing custom data parallel training loops.
276+
#' Defaults to `"none"`.
276277
#' * `name`: String name of the variable. Useful for debugging purposes.
277278
#'
278279
#' Returns:

0 commit comments

Comments
 (0)