W3cubDocs

/TensorFlow C++

tensorflow::ops::Barrier

#include <data_flow_ops.h>

Defines a barrier that persists across different graph executions.

Summary

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.

Arguments:

  • scope: A Scope object
  • component_types: The type of each component in a value.

Optional attributes (see Attrs):

  • shapes: 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: The capacity of the barrier. The default capacity is MAX_INT32, which is the largest capacity of the underlying queue.
  • container: If non-empty, this barrier is placed in the given container. Otherwise, a default container is used.
  • shared_name: If non-empty, this barrier will be shared under the given name across multiple sessions.

Returns:

  • Output: The handle to the barrier.
Constructors and Destructors
Barrier(const ::tensorflow::Scope & scope, const DataTypeSlice & component_types)
Barrier(const ::tensorflow::Scope & scope, const DataTypeSlice & component_types, const Barrier::Attrs & attrs)
Public attributes
handle
Public functions
node() const
::tensorflow::Node *
operator::tensorflow::Input() const
operator::tensorflow::Output() const
Public static functions
Capacity(int64 x)
Container(StringPiece x)
Shapes(const gtl::ArraySlice< PartialTensorShape > & x)
SharedName(StringPiece x)
Structs
tensorflow::ops::Barrier::Attrs

Optional attribute setters for Barrier.

Public attributes

handle

::tensorflow::Output handle

Public functions

Barrier

 Barrier(
  const ::tensorflow::Scope & scope,
  const DataTypeSlice & component_types
)

Barrier

 Barrier(
  const ::tensorflow::Scope & scope,
  const DataTypeSlice & component_types,
  const Barrier::Attrs & attrs
)

node

::tensorflow::Node * node() const 

operator::tensorflow::Input

operator::tensorflow::Input() const 

operator::tensorflow::Output

operator::tensorflow::Output() const 

Public static functions

Capacity

Attrs Capacity(
  int64 x
)

Container

Attrs Container(
  StringPiece x
)

Shapes

Attrs Shapes(
  const gtl::ArraySlice< PartialTensorShape > & x
)

SharedName

Attrs SharedName(
  StringPiece x
)

© 2017 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/cc/class/tensorflow/ops/barrier.html