Update documentation for trainable SyncOnRead variables.
PiperOrigin-RevId: 252010869
This commit is contained in:
parent
bfc8733ffb
commit
c8bcbeff7c
@ -249,8 +249,6 @@ def variable(name,
|
|||||||
Accepted values are constants defined in the class
|
Accepted values are constants defined in the class
|
||||||
`tf.VariableSynchronization`. By default the synchronization is set to
|
`tf.VariableSynchronization`. By default the synchronization is set to
|
||||||
`AUTO` and the current `DistributionStrategy` chooses when to synchronize.
|
`AUTO` and the current `DistributionStrategy` chooses when to synchronize.
|
||||||
If `synchronization` is set to `ON_READ`, `trainable` must not be set to
|
|
||||||
`True`.
|
|
||||||
aggregation: Indicates how a distributed variable will be aggregated.
|
aggregation: Indicates how a distributed variable will be aggregated.
|
||||||
Accepted values are constants defined in the class
|
Accepted values are constants defined in the class
|
||||||
`tf.VariableAggregation`.
|
`tf.VariableAggregation`.
|
||||||
@ -327,8 +325,6 @@ def model_variable(name,
|
|||||||
Accepted values are constants defined in the class
|
Accepted values are constants defined in the class
|
||||||
`tf.VariableSynchronization`. By default the synchronization is set to
|
`tf.VariableSynchronization`. By default the synchronization is set to
|
||||||
`AUTO` and the current `DistributionStrategy` chooses when to synchronize.
|
`AUTO` and the current `DistributionStrategy` chooses when to synchronize.
|
||||||
If `synchronization` is set to `ON_READ`, `trainable` must not be set to
|
|
||||||
`True`.
|
|
||||||
aggregation: Indicates how a distributed variable will be aggregated.
|
aggregation: Indicates how a distributed variable will be aggregated.
|
||||||
Accepted values are constants defined in the class
|
Accepted values are constants defined in the class
|
||||||
`tf.VariableAggregation`.
|
`tf.VariableAggregation`.
|
||||||
|
@ -97,8 +97,7 @@ class UnliftedInitializerVariable(resource_variable_ops.UninitializedVariable):
|
|||||||
aggregated. Accepted values are constants defined in the class
|
aggregated. Accepted values are constants defined in the class
|
||||||
`tf.VariableSynchronization`. By default the synchronization is set to
|
`tf.VariableSynchronization`. By default the synchronization is set to
|
||||||
`AUTO` and the current `DistributionStrategy` chooses
|
`AUTO` and the current `DistributionStrategy` chooses
|
||||||
when to synchronize. If `synchronization` is set to `ON_READ`,
|
when to synchronize.
|
||||||
`trainable` must not be set to `True`.
|
|
||||||
aggregation: Indicates how a distributed variable will be aggregated.
|
aggregation: Indicates how a distributed variable will be aggregated.
|
||||||
Accepted values are constants defined in the class
|
Accepted values are constants defined in the class
|
||||||
`tf.VariableAggregation`.
|
`tf.VariableAggregation`.
|
||||||
|
@ -388,7 +388,8 @@ class ResourceVariable(variables.VariableV1):
|
|||||||
trainable: If `True`, the default, also adds the variable to the graph
|
trainable: If `True`, the default, also adds the variable to the graph
|
||||||
collection `GraphKeys.TRAINABLE_VARIABLES`. This collection is used as
|
collection `GraphKeys.TRAINABLE_VARIABLES`. This collection is used as
|
||||||
the default list of variables to use by the `Optimizer` classes.
|
the default list of variables to use by the `Optimizer` classes.
|
||||||
Defaults to `True` unless `synchronization` is set to `ON_READ`.
|
Defaults to `True`, unless `synchronization` is set to `ON_READ`, in
|
||||||
|
which case it defaults to `False`.
|
||||||
collections: List of graph collections keys. The new variable is added to
|
collections: List of graph collections keys. The new variable is added to
|
||||||
these collections. Defaults to `[GraphKeys.GLOBAL_VARIABLES]`.
|
these collections. Defaults to `[GraphKeys.GLOBAL_VARIABLES]`.
|
||||||
validate_shape: Ignored. Provided for compatibility with tf.Variable.
|
validate_shape: Ignored. Provided for compatibility with tf.Variable.
|
||||||
@ -421,8 +422,7 @@ class ResourceVariable(variables.VariableV1):
|
|||||||
aggregated. Accepted values are constants defined in the class
|
aggregated. Accepted values are constants defined in the class
|
||||||
`tf.VariableSynchronization`. By default the synchronization is set to
|
`tf.VariableSynchronization`. By default the synchronization is set to
|
||||||
`AUTO` and the current `DistributionStrategy` chooses
|
`AUTO` and the current `DistributionStrategy` chooses
|
||||||
when to synchronize. If `synchronization` is set to `ON_READ`,
|
when to synchronize.
|
||||||
`trainable` must not be set to `True`.
|
|
||||||
aggregation: Indicates how a distributed variable will be aggregated.
|
aggregation: Indicates how a distributed variable will be aggregated.
|
||||||
Accepted values are constants defined in the class
|
Accepted values are constants defined in the class
|
||||||
`tf.VariableAggregation`.
|
`tf.VariableAggregation`.
|
||||||
@ -495,7 +495,8 @@ class ResourceVariable(variables.VariableV1):
|
|||||||
trainable: If `True`, the default, also adds the variable to the graph
|
trainable: If `True`, the default, also adds the variable to the graph
|
||||||
collection `GraphKeys.TRAINABLE_VARIABLES`. This collection is used as
|
collection `GraphKeys.TRAINABLE_VARIABLES`. This collection is used as
|
||||||
the default list of variables to use by the `Optimizer` classes.
|
the default list of variables to use by the `Optimizer` classes.
|
||||||
Defaults to `True` unless `synchronization` is set to `ON_READ`.
|
Defaults to `True`, unless `synchronization` is set to `ON_READ`, in
|
||||||
|
which case it defaults to `False`.
|
||||||
collections: List of graph collections keys. The new variable is added to
|
collections: List of graph collections keys. The new variable is added to
|
||||||
these collections. Defaults to `[GraphKeys.GLOBAL_VARIABLES]`.
|
these collections. Defaults to `[GraphKeys.GLOBAL_VARIABLES]`.
|
||||||
caching_device: Optional device string or function describing where the
|
caching_device: Optional device string or function describing where the
|
||||||
@ -520,8 +521,7 @@ class ResourceVariable(variables.VariableV1):
|
|||||||
aggregated. Accepted values are constants defined in the class
|
aggregated. Accepted values are constants defined in the class
|
||||||
`tf.VariableSynchronization`. By default the synchronization is set to
|
`tf.VariableSynchronization`. By default the synchronization is set to
|
||||||
`AUTO` and the current `DistributionStrategy` chooses
|
`AUTO` and the current `DistributionStrategy` chooses
|
||||||
when to synchronize. If `synchronization` is set to `ON_READ`,
|
when to synchronize.
|
||||||
`trainable` must not be set to `True`.
|
|
||||||
aggregation: Indicates how a distributed variable will be aggregated.
|
aggregation: Indicates how a distributed variable will be aggregated.
|
||||||
Accepted values are constants defined in the class
|
Accepted values are constants defined in the class
|
||||||
`tf.VariableAggregation`.
|
`tf.VariableAggregation`.
|
||||||
@ -1793,8 +1793,7 @@ class UninitializedVariable(ResourceVariable):
|
|||||||
aggregated. Accepted values are constants defined in the class
|
aggregated. Accepted values are constants defined in the class
|
||||||
`tf.VariableSynchronization`. By default the synchronization is set to
|
`tf.VariableSynchronization`. By default the synchronization is set to
|
||||||
`AUTO` and the current `DistributionStrategy` chooses
|
`AUTO` and the current `DistributionStrategy` chooses
|
||||||
when to synchronize. If `synchronization` is set to `ON_READ`,
|
when to synchronize.
|
||||||
`trainable` must not be set to `True`.
|
|
||||||
aggregation: Indicates how a distributed variable will be aggregated.
|
aggregation: Indicates how a distributed variable will be aggregated.
|
||||||
Accepted values are constants defined in the class
|
Accepted values are constants defined in the class
|
||||||
`tf.VariableAggregation`.
|
`tf.VariableAggregation`.
|
||||||
|
@ -337,7 +337,8 @@ class _VariableStore(object):
|
|||||||
forced to be False.
|
forced to be False.
|
||||||
trainable: If `True` also add the variable to the graph collection
|
trainable: If `True` also add the variable to the graph collection
|
||||||
`GraphKeys.TRAINABLE_VARIABLES` (see `tf.Variable`). `trainable`
|
`GraphKeys.TRAINABLE_VARIABLES` (see `tf.Variable`). `trainable`
|
||||||
defaults to `True` unless `synchronization` is set to `ON_READ`.
|
defaults to `True`, unless `synchronization` is set to `ON_READ`, in
|
||||||
|
which case it defaults to `False`.
|
||||||
collections: List of graph collections keys to add the `Variable` to.
|
collections: List of graph collections keys to add the `Variable` to.
|
||||||
Defaults to `[GraphKeys.GLOBAL_VARIABLES]` (see `tf.Variable`).
|
Defaults to `[GraphKeys.GLOBAL_VARIABLES]` (see `tf.Variable`).
|
||||||
caching_device: Optional device string or function describing where the
|
caching_device: Optional device string or function describing where the
|
||||||
@ -1588,8 +1589,7 @@ Args:
|
|||||||
aggregated. Accepted values are constants defined in the class
|
aggregated. Accepted values are constants defined in the class
|
||||||
`tf.VariableSynchronization`. By default the synchronization is set to
|
`tf.VariableSynchronization`. By default the synchronization is set to
|
||||||
`AUTO` and the current `DistributionStrategy` chooses
|
`AUTO` and the current `DistributionStrategy` chooses
|
||||||
when to synchronize. If `synchronization` is set to `ON_READ`,
|
when to synchronize.
|
||||||
`trainable` must not be set to `True`.
|
|
||||||
aggregation: Indicates how a distributed variable will be aggregated.
|
aggregation: Indicates how a distributed variable will be aggregated.
|
||||||
Accepted values are constants defined in the class
|
Accepted values are constants defined in the class
|
||||||
`tf.VariableAggregation`.
|
`tf.VariableAggregation`.
|
||||||
@ -1733,8 +1733,6 @@ def _get_partitioned_variable(name,
|
|||||||
Accepted values are constants defined in the class
|
Accepted values are constants defined in the class
|
||||||
`tf.VariableSynchronization`. By default the synchronization is set to
|
`tf.VariableSynchronization`. By default the synchronization is set to
|
||||||
`AUTO` and the current `DistributionStrategy` chooses when to synchronize.
|
`AUTO` and the current `DistributionStrategy` chooses when to synchronize.
|
||||||
If `synchronization` is set to `ON_READ`, `trainable` must not be set to
|
|
||||||
`True`.
|
|
||||||
aggregation: Indicates how a distributed variable will be aggregated.
|
aggregation: Indicates how a distributed variable will be aggregated.
|
||||||
Accepted values are constants defined in the class
|
Accepted values are constants defined in the class
|
||||||
`tf.VariableAggregation`.
|
`tf.VariableAggregation`.
|
||||||
@ -2596,8 +2594,8 @@ def variable_creator_scope_v1(variable_creator):
|
|||||||
trainable: If `True`, the default, also adds the variable to the graph
|
trainable: If `True`, the default, also adds the variable to the graph
|
||||||
collection `GraphKeys.TRAINABLE_VARIABLES`. This collection is used as
|
collection `GraphKeys.TRAINABLE_VARIABLES`. This collection is used as
|
||||||
the default list of variables to use by the `Optimizer` classes.
|
the default list of variables to use by the `Optimizer` classes.
|
||||||
`trainable` defaults to `True` unless `synchronization` is
|
`trainable` defaults to `True`, unless `synchronization` is
|
||||||
set to `ON_READ`.
|
set to `ON_READ`, in which case it defaults to `False`.
|
||||||
collections: List of graph collections keys. The new variable is added to
|
collections: List of graph collections keys. The new variable is added to
|
||||||
these collections. Defaults to `[GraphKeys.GLOBAL_VARIABLES]`.
|
these collections. Defaults to `[GraphKeys.GLOBAL_VARIABLES]`.
|
||||||
validate_shape: If `False`, allows the variable to be initialized with a
|
validate_shape: If `False`, allows the variable to be initialized with a
|
||||||
@ -2620,8 +2618,7 @@ def variable_creator_scope_v1(variable_creator):
|
|||||||
aggregated. Accepted values are constants defined in the class
|
aggregated. Accepted values are constants defined in the class
|
||||||
`tf.VariableSynchronization`. By default the synchronization is set to
|
`tf.VariableSynchronization`. By default the synchronization is set to
|
||||||
`AUTO` and the current `DistributionStrategy` chooses
|
`AUTO` and the current `DistributionStrategy` chooses
|
||||||
when to synchronize. If `synchronization` is set to `ON_READ`,
|
when to synchronize.
|
||||||
`trainable` must not be set to `True`.
|
|
||||||
aggregation: Indicates how a distributed variable will be aggregated.
|
aggregation: Indicates how a distributed variable will be aggregated.
|
||||||
Accepted values are constants defined in the class
|
Accepted values are constants defined in the class
|
||||||
`tf.VariableAggregation`.
|
`tf.VariableAggregation`.
|
||||||
@ -2690,8 +2687,7 @@ def variable_creator_scope(variable_creator):
|
|||||||
aggregated. Accepted values are constants defined in the class
|
aggregated. Accepted values are constants defined in the class
|
||||||
`tf.VariableSynchronization`. By default the synchronization is set to
|
`tf.VariableSynchronization`. By default the synchronization is set to
|
||||||
`AUTO` and the current `DistributionStrategy` chooses
|
`AUTO` and the current `DistributionStrategy` chooses
|
||||||
when to synchronize. If `synchronization` is set to `ON_READ`,
|
when to synchronize.
|
||||||
`trainable` must not be set to `True`.
|
|
||||||
aggregation: Indicates how a distributed variable will be aggregated.
|
aggregation: Indicates how a distributed variable will be aggregated.
|
||||||
Accepted values are constants defined in the class
|
Accepted values are constants defined in the class
|
||||||
`tf.VariableAggregation`.
|
`tf.VariableAggregation`.
|
||||||
|
@ -404,8 +404,8 @@ class Variable(six.with_metaclass(VariableMetaclass,
|
|||||||
that case, `dtype` must be specified. (Note that initializer functions
|
that case, `dtype` must be specified. (Note that initializer functions
|
||||||
from init_ops.py must first be bound to a shape before being used here.)
|
from init_ops.py must first be bound to a shape before being used here.)
|
||||||
trainable: If `True`, GradientTapes automatically watch uses
|
trainable: If `True`, GradientTapes automatically watch uses
|
||||||
of this variable. Defaults to `True` unless `synchronization` is
|
of this variable. Defaults to `True`, unless `synchronization` is
|
||||||
set to `ON_READ`.
|
set to `ON_READ`, in which case it defaults to `False`.
|
||||||
validate_shape: If `False`, allows the variable to be initialized with a
|
validate_shape: If `False`, allows the variable to be initialized with a
|
||||||
value of unknown shape. If `True`, the default, the shape of
|
value of unknown shape. If `True`, the default, the shape of
|
||||||
`initial_value` must be known.
|
`initial_value` must be known.
|
||||||
@ -436,8 +436,7 @@ class Variable(six.with_metaclass(VariableMetaclass,
|
|||||||
aggregated. Accepted values are constants defined in the class
|
aggregated. Accepted values are constants defined in the class
|
||||||
`tf.VariableSynchronization`. By default the synchronization is set to
|
`tf.VariableSynchronization`. By default the synchronization is set to
|
||||||
`AUTO` and the current `DistributionStrategy` chooses
|
`AUTO` and the current `DistributionStrategy` chooses
|
||||||
when to synchronize. If `synchronization` is set to `ON_READ`,
|
when to synchronize.
|
||||||
`trainable` must not be set to `True`.
|
|
||||||
aggregation: Indicates how a distributed variable will be aggregated.
|
aggregation: Indicates how a distributed variable will be aggregated.
|
||||||
Accepted values are constants defined in the class
|
Accepted values are constants defined in the class
|
||||||
`tf.VariableAggregation`.
|
`tf.VariableAggregation`.
|
||||||
@ -1449,7 +1448,8 @@ class VariableV1(Variable):
|
|||||||
trainable: If `True`, also adds the variable to the graph
|
trainable: If `True`, also adds the variable to the graph
|
||||||
collection `GraphKeys.TRAINABLE_VARIABLES`. This collection is used as
|
collection `GraphKeys.TRAINABLE_VARIABLES`. This collection is used as
|
||||||
the default list of variables to use by the `Optimizer` classes.
|
the default list of variables to use by the `Optimizer` classes.
|
||||||
Defaults to `True` unless `synchronization` is set to `ON_READ`.
|
Defaults to `True`, unless `synchronization` is set to `ON_READ`, in
|
||||||
|
which case it defaults to `False`.
|
||||||
collections: List of graph collections keys. The new variable is added to
|
collections: List of graph collections keys. The new variable is added to
|
||||||
these collections. Defaults to `[GraphKeys.GLOBAL_VARIABLES]`.
|
these collections. Defaults to `[GraphKeys.GLOBAL_VARIABLES]`.
|
||||||
validate_shape: If `False`, allows the variable to be initialized with a
|
validate_shape: If `False`, allows the variable to be initialized with a
|
||||||
@ -1485,8 +1485,7 @@ class VariableV1(Variable):
|
|||||||
aggregated. Accepted values are constants defined in the class
|
aggregated. Accepted values are constants defined in the class
|
||||||
`tf.VariableSynchronization`. By default the synchronization is set to
|
`tf.VariableSynchronization`. By default the synchronization is set to
|
||||||
`AUTO` and the current `DistributionStrategy` chooses
|
`AUTO` and the current `DistributionStrategy` chooses
|
||||||
when to synchronize. If `synchronization` is set to `ON_READ`,
|
when to synchronize.
|
||||||
`trainable` must not be set to `True`.
|
|
||||||
aggregation: Indicates how a distributed variable will be aggregated.
|
aggregation: Indicates how a distributed variable will be aggregated.
|
||||||
Accepted values are constants defined in the class
|
Accepted values are constants defined in the class
|
||||||
`tf.VariableAggregation`.
|
`tf.VariableAggregation`.
|
||||||
@ -1545,7 +1544,8 @@ class RefVariable(VariableV1):
|
|||||||
trainable: If `True`, also adds the variable to the graph
|
trainable: If `True`, also adds the variable to the graph
|
||||||
collection `GraphKeys.TRAINABLE_VARIABLES`. This collection is used as
|
collection `GraphKeys.TRAINABLE_VARIABLES`. This collection is used as
|
||||||
the default list of variables to use by the `Optimizer` classes.
|
the default list of variables to use by the `Optimizer` classes.
|
||||||
Defaults to `True` unless `synchronization` is set to `ON_READ`.
|
Defaults to `True`, unless `synchronization` is set to `ON_READ`, in
|
||||||
|
which case it defaults to `False`.
|
||||||
collections: List of graph collections keys. The new variable is added to
|
collections: List of graph collections keys. The new variable is added to
|
||||||
these collections. Defaults to `[GraphKeys.GLOBAL_VARIABLES]`.
|
these collections. Defaults to `[GraphKeys.GLOBAL_VARIABLES]`.
|
||||||
validate_shape: If `False`, allows the variable to be initialized with a
|
validate_shape: If `False`, allows the variable to be initialized with a
|
||||||
@ -1580,8 +1580,7 @@ class RefVariable(VariableV1):
|
|||||||
aggregated. Accepted values are constants defined in the class
|
aggregated. Accepted values are constants defined in the class
|
||||||
`tf.VariableSynchronization`. By default the synchronization is set to
|
`tf.VariableSynchronization`. By default the synchronization is set to
|
||||||
`AUTO` and the current `DistributionStrategy` chooses
|
`AUTO` and the current `DistributionStrategy` chooses
|
||||||
when to synchronize. If `synchronization` is set to `ON_READ`,
|
when to synchronize.
|
||||||
`trainable` must not be set to `True`.
|
|
||||||
aggregation: Indicates how a distributed variable will be aggregated.
|
aggregation: Indicates how a distributed variable will be aggregated.
|
||||||
Accepted values are constants defined in the class
|
Accepted values are constants defined in the class
|
||||||
`tf.VariableAggregation`.
|
`tf.VariableAggregation`.
|
||||||
@ -1653,7 +1652,8 @@ class RefVariable(VariableV1):
|
|||||||
trainable: If `True`, also adds the variable to the graph
|
trainable: If `True`, also adds the variable to the graph
|
||||||
collection `GraphKeys.TRAINABLE_VARIABLES`. This collection is used as
|
collection `GraphKeys.TRAINABLE_VARIABLES`. This collection is used as
|
||||||
the default list of variables to use by the `Optimizer` classes.
|
the default list of variables to use by the `Optimizer` classes.
|
||||||
Defaults to `True` unless `synchronization` is set to `ON_READ`.
|
Defaults to `True`, unless `synchronization` is set to `ON_READ`, in
|
||||||
|
which case it defaults to `False`.
|
||||||
collections: List of graph collections keys. The new variable is added to
|
collections: List of graph collections keys. The new variable is added to
|
||||||
these collections. Defaults to `[GraphKeys.GLOBAL_VARIABLES]`.
|
these collections. Defaults to `[GraphKeys.GLOBAL_VARIABLES]`.
|
||||||
validate_shape: If `False`, allows the variable to be initialized with a
|
validate_shape: If `False`, allows the variable to be initialized with a
|
||||||
@ -1682,8 +1682,7 @@ class RefVariable(VariableV1):
|
|||||||
aggregated. Accepted values are constants defined in the class
|
aggregated. Accepted values are constants defined in the class
|
||||||
`tf.VariableSynchronization`. By default the synchronization is set to
|
`tf.VariableSynchronization`. By default the synchronization is set to
|
||||||
`AUTO` and the current `DistributionStrategy` chooses
|
`AUTO` and the current `DistributionStrategy` chooses
|
||||||
when to synchronize. If `synchronization` is set to `ON_READ`,
|
when to synchronize.
|
||||||
`trainable` must not be set to `True`.
|
|
||||||
aggregation: Indicates how a distributed variable will be aggregated.
|
aggregation: Indicates how a distributed variable will be aggregated.
|
||||||
Accepted values are constants defined in the class
|
Accepted values are constants defined in the class
|
||||||
`tf.VariableAggregation`.
|
`tf.VariableAggregation`.
|
||||||
|
Loading…
Reference in New Issue
Block a user