컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
텐서플로우:: 작전:: 장벽
#include <data_flow_ops.h>
다양한 그래프 실행에서 지속되는 장벽을 정의합니다.
요약
장벽은 키-값 맵을 나타내며, 여기서 각 키는 문자열이고 각 값은 텐서의 튜플입니다.
런타임 시 장벽에는 '완전' 및 '불완전' 요소가 포함됩니다. 완전한 요소는 해당 값 튜플의 모든 구성 요소에 대해 텐서를 정의했으며 BarrierTakeMany를 사용하여 액세스할 수 있습니다. 불완전한 요소의 값 튜플에는 정의되지 않은 일부 구성 요소가 있으며 BarrierInsertMany를 사용하여 업데이트될 수 있습니다.
인수:
- 범위: 범위 개체
- component_types: 값의 각 구성 요소 유형입니다.
선택적 속성( Attrs
참조):
- 모양: 값의 각 구성 요소 모양입니다. 각 모양은 첫 번째 차원에서 1이어야 합니다. 이 속성의 길이는 component_types의 길이와 동일해야 합니다.
- 용량: 장벽의 용량입니다. 기본 용량은 기본 대기열의 최대 용량인 MAX_INT32입니다.
- 컨테이너: 비어 있지 않은 경우 이 장벽은 지정된 컨테이너에 배치됩니다. 그렇지 않으면 기본 컨테이너가 사용됩니다.
- shared_name: 비어 있지 않은 경우 이 장벽은 여러 세션에서 지정된 이름으로 공유됩니다.
보고:
공개 속성
공공 기능
장벽
Barrier(
const ::tensorflow::Scope & scope,
const DataTypeSlice & component_types
)
마디
::tensorflow::Node * node() const
operator::tensorflow::Input() const
연산자::텐서플로우::출력
operator::tensorflow::Output() const
공개 정적 함수
용량
Attrs Capacity(
int64 x
)
컨테이너
Attrs Container(
StringPiece x
)
모양
Attrs Shapes(
const gtl::ArraySlice< PartialTensorShape > & x
)
공유 이름
Attrs SharedName(
StringPiece x
)
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-27(UTC)
[null,null,["최종 업데이트: 2025-07-27(UTC)"],[],[],null,["# tensorflow::ops::Barrier Class Reference\n\ntensorflow::ops::Barrier\n========================\n\n`#include \u003cdata_flow_ops.h\u003e`\n\nDefines a barrier that persists across different graph executions.\n\nSummary\n-------\n\nA barrier represents a key-value map, where each key is a string, and each value is a tuple of tensors.\n\nAt 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](/versions/r2.3/api_docs/cc/class/tensorflow/ops/barrier-take-many#classtensorflow_1_1ops_1_1_barrier_take_many). An incomplete element has some undefined components in its value tuple, and may be updated using [BarrierInsertMany](/versions/r2.3/api_docs/cc/class/tensorflow/ops/barrier-insert-many#classtensorflow_1_1ops_1_1_barrier_insert_many).\n\nArguments:\n\n- scope: A [Scope](/versions/r2.3/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- component_types: The type of each component in a value.\n\n\u003cbr /\u003e\n\nOptional attributes (see [Attrs](/versions/r2.3/api_docs/cc/struct/tensorflow/ops/barrier/attrs#structtensorflow_1_1ops_1_1_barrier_1_1_attrs)):\n\n- 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.\n- capacity: The capacity of the barrier. The default capacity is MAX_INT32, which is the largest capacity of the underlying queue.\n- container: If non-empty, this barrier is placed in the given container. Otherwise, a default container is used.\n- shared_name: If non-empty, this barrier will be shared under the given name across multiple sessions.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.3/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): The handle to the barrier.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [Barrier](#classtensorflow_1_1ops_1_1_barrier_1ae400cc957e34014ea577177c9ee259a7)`(const ::`[tensorflow::Scope](/versions/r2.3/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, const DataTypeSlice & component_types)` ||\n| [Barrier](#classtensorflow_1_1ops_1_1_barrier_1a16852c2beb26f3659acdabc69c948e91)`(const ::`[tensorflow::Scope](/versions/r2.3/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, const DataTypeSlice & component_types, const `[Barrier::Attrs](/versions/r2.3/api_docs/cc/struct/tensorflow/ops/barrier/attrs#structtensorflow_1_1ops_1_1_barrier_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|-------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [handle](#classtensorflow_1_1ops_1_1_barrier_1a999e0c86fdd1442995bd4dcd49f55f75) | `::`[tensorflow::Output](/versions/r2.3/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n| [operation](#classtensorflow_1_1ops_1_1_barrier_1a66ea0f34005305664b3a8c2b7237c73b) | [Operation](/versions/r2.3/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n\n| ### Public functions ||\n|-------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_barrier_1a0572d54a742a10d03a030edd48180865)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_barrier_1a4b6914f3b4916e256dd1b02e731c71b3)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_barrier_1a00b400c1c0d2a50625e5f1deefd7510f)`() const ` | ` ` ` ` |\n\n| ### Public static functions ||\n|-------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------|\n| [Capacity](#classtensorflow_1_1ops_1_1_barrier_1a393954a81f232e756e680fc9e091595d)`(int64 x)` | [Attrs](/versions/r2.3/api_docs/cc/struct/tensorflow/ops/barrier/attrs#structtensorflow_1_1ops_1_1_barrier_1_1_attrs) |\n| [Container](#classtensorflow_1_1ops_1_1_barrier_1af53271d59cca63c440ef591e790c1a0a)`(StringPiece x)` | [Attrs](/versions/r2.3/api_docs/cc/struct/tensorflow/ops/barrier/attrs#structtensorflow_1_1ops_1_1_barrier_1_1_attrs) |\n| [Shapes](#classtensorflow_1_1ops_1_1_barrier_1a6f503841ebe322db85d2826f56de4fb8)`(const gtl::ArraySlice\u003c PartialTensorShape \u003e & x)` | [Attrs](/versions/r2.3/api_docs/cc/struct/tensorflow/ops/barrier/attrs#structtensorflow_1_1ops_1_1_barrier_1_1_attrs) |\n| [SharedName](#classtensorflow_1_1ops_1_1_barrier_1a704c1a8c990c6afe3854ddc6cf9d3d6e)`(StringPiece x)` | [Attrs](/versions/r2.3/api_docs/cc/struct/tensorflow/ops/barrier/attrs#structtensorflow_1_1ops_1_1_barrier_1_1_attrs) |\n\n| ### Structs ||\n|---------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::Barrier::Attrs](/versions/r2.3/api_docs/cc/struct/tensorflow/ops/barrier/attrs) | Optional attribute setters for [Barrier](/versions/r2.3/api_docs/cc/class/tensorflow/ops/barrier#classtensorflow_1_1ops_1_1_barrier). |\n\nPublic attributes\n-----------------\n\n### handle\n\n```text\n::tensorflow::Output handle\n``` \n\n### operation\n\n```text\nOperation operation\n``` \n\nPublic functions\n----------------\n\n### Barrier\n\n```gdscript\n Barrier(\n const ::tensorflow::Scope & scope,\n const DataTypeSlice & component_types\n)\n``` \n\n### Barrier\n\n```gdscript\n Barrier(\n const ::tensorflow::Scope & scope,\n const DataTypeSlice & component_types,\n const Barrier::Attrs & attrs\n)\n``` \n\n### node\n\n```gdscript\n::tensorflow::Node * node() const \n``` \n\n### operator::tensorflow::Input\n\n```gdscript\n operator::tensorflow::Input() const \n``` \n\n### operator::tensorflow::Output\n\n```gdscript\n operator::tensorflow::Output() const \n``` \n\nPublic static functions\n-----------------------\n\n### Capacity\n\n```text\nAttrs Capacity(\n int64 x\n)\n``` \n\n### Container\n\n```text\nAttrs Container(\n StringPiece x\n)\n``` \n\n### Shapes\n\n```gdscript\nAttrs Shapes(\n const gtl::ArraySlice\u003c PartialTensorShape \u003e & x\n)\n``` \n\n### SharedName\n\n```text\nAttrs SharedName(\n StringPiece x\n)\n```"]]