tf.raw_ops.Barrier
Stay organized with collections
Save and categorize content based on your preferences.
Defines a barrier that persists across different graph executions.
tf.raw_ops.Barrier(
component_types,
shapes=[],
capacity=-1,
container='',
shared_name='',
name=None
)
A barrier represents a key-value map, where each key is a string, and
each value is a tuple of tensors.
At runtime, the barrier contains 'complete' and 'incomplete'
elements. A complete element has defined tensors for all components of
its value tuple, and may be accessed using BarrierTakeMany. An
incomplete element has some undefined components in its value tuple,
and may be updated using BarrierInsertMany.
Args |
component_types
|
A list of tf.DTypes that has length >= 1 .
The type of each component in a value.
|
shapes
|
An optional list of shapes (each a tf.TensorShape or list of ints ). Defaults to [] .
The shape of each component in a value. Each shape must be 1 in the
first dimension. The length of this attr must be the same as the length of
component_types.
|
capacity
|
An optional int . Defaults to -1 .
The capacity of the barrier. The default capacity is MAX_INT32,
which is the largest capacity of the underlying queue.
|
container
|
An optional string . Defaults to "" .
If non-empty, this barrier is placed in the given container.
Otherwise, a default container is used.
|
shared_name
|
An optional string . Defaults to "" .
If non-empty, this barrier will be shared under the given name
across multiple sessions.
|
name
|
A name for the operation (optional).
|
Returns |
A Tensor of type mutable string .
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.
Last updated 2024-04-26 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-04-26 UTC."],[],[],null,["# tf.raw_ops.Barrier\n\n\u003cbr /\u003e\n\nDefines a barrier that persists across different graph executions.\n\n#### View aliases\n\n\n**Compat aliases for migration**\n\nSee\n[Migration guide](https://www.tensorflow.org/guide/migrate) for\nmore details.\n\n[`tf.compat.v1.raw_ops.Barrier`](https://www.tensorflow.org/api_docs/python/tf/raw_ops/Barrier)\n\n\u003cbr /\u003e\n\n tf.raw_ops.Barrier(\n component_types,\n shapes=[],\n capacity=-1,\n container='',\n shared_name='',\n name=None\n )\n\nA barrier represents a key-value map, where each key is a string, and\neach value is a tuple of tensors.\n\nAt runtime, the barrier contains 'complete' and 'incomplete'\nelements. A complete element has defined tensors for all components of\nits value tuple, and may be accessed using BarrierTakeMany. An\nincomplete element has some undefined components in its value tuple,\nand may be updated using BarrierInsertMany.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|-------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `component_types` | A list of `tf.DTypes` that has length `\u003e= 1`. The type of each component in a value. |\n| `shapes` | An optional list of shapes (each a [`tf.TensorShape`](../../tf/TensorShape) or list of `ints`). Defaults to `[]`. The shape of each component in a value. Each shape must be 1 in the first dimension. The length of this attr must be the same as the length of component_types. |\n| `capacity` | An optional `int`. Defaults to `-1`. The capacity of the barrier. The default capacity is MAX_INT32, which is the largest capacity of the underlying queue. |\n| `container` | An optional `string`. Defaults to `\"\"`. If non-empty, this barrier is placed in the given container. Otherwise, a default container is used. |\n| `shared_name` | An optional `string`. Defaults to `\"\"`. If non-empty, this barrier will be shared under the given name across multiple sessions. |\n| `name` | A name for the operation (optional). |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| A `Tensor` of type mutable `string`. ||\n\n\u003cbr /\u003e"]]