텐서플로우:: ops:: TensorArray
#include <data_flow_ops.h>주어진 크기의 텐서 배열.
요약
쓰기는 Write 함수를 통해, 읽기는 Read 또는 Pack 함수를 통해 수행합니다.
논거:
- 범위: Scope 객체
- 크기: 배열의 크기입니다.
- dtype: 텐서 배열의 요소 유형입니다.
선택적 속성( Attrs 참조):
- element_shape: 알려진 경우 요소의 예상 모양입니다. TensorArray 요소의 모양을 검증하는 데 사용됩니다. 이 모양이 완전히 지정되지 않으면 크기가 0인 TensorArray를 수집하는 것은 오류입니다.
- dynamic_size: TensorArray 에 대한 쓰기 작업으로 인해 크기가 증가할 수 있는지 여부를 결정하는 부울 값입니다. 기본적으로는 허용되지 않습니다.
- clear_after_read: true(기본값)인 경우, TensorArray 의 텐서는 읽은 후 초기화됩니다. 이렇게 하면 여러 번 읽기 시맨틱이 비활성화되지만 메모리를 조기에 해제할 수 있습니다.
- identical_element_shapes: true로 설정하면(기본값은 false), TensorArray 의 모든 요소는 동일한 형태를 가져야 합니다. 이를 통해 쓰기 시 형태 일관성을 동적으로 확인하거나, element_shape 속성이 완전히 정의되지 않은 경우에도 스택에 형태가 올바른 0 텐서를 채울 수 있는 등의 특정 동작을 구현할 수 있습니다.
- tensor_array_name: 임시 tensor_array 리소스에 사용되는 이름을 재정의합니다. 기본값은 ' TensorArray ' 연산의 이름이며, 이는 고유성이 보장됩니다.
보고:
-
Output핸들: TensorArray 에 대한 핸들입니다. -
Output흐름: 기울기 흐름을 제어하는 데 사용되는 스칼라 값입니다.
생성자와 소멸자 | |
|---|---|
TensorArray (const :: tensorflow::Scope & scope, :: tensorflow::Input size, DataType dtype) | |
TensorArray (const :: tensorflow::Scope & scope, :: tensorflow::Input size, DataType dtype, const TensorArray::Attrs & attrs) |
공개 속성 | |
|---|---|
flow | |
handle | |
operation | |
공개 정적 함수 | |
|---|---|
ClearAfterRead (bool x) | |
DynamicSize (bool x) | |
ElementShape (PartialTensorShape x) | |
IdenticalElementShapes (bool x) | |
TensorArrayName (StringPiece x) | |
구조 | |
|---|---|
| 텐서플로우:: 연산:: 텐서어레이:: 속성 | TensorArray 에 대한 선택적 속성 설정기입니다. |
공개 속성
흐름
::tensorflow::Output flow
핸들
::tensorflow::Output handle
작업
Operation operation
공공 기능
텐서 배열
TensorArray( const ::tensorflow::Scope & scope, ::tensorflow::Input size, DataType dtype )
텐서 배열
TensorArray( const ::tensorflow::Scope & scope, ::tensorflow::Input size, DataType dtype, const TensorArray::Attrs & attrs )
공개 정적 함수
읽기 후 지우기
Attrs ClearAfterRead( bool x )
다이내믹사이즈
Attrs DynamicSize( bool x )
요소 모양
Attrs ElementShape( PartialTensorShape x )
동일한 요소 모양
Attrs IdenticalElementShapes( bool x )
텐서 배열 이름
Attrs TensorArrayName( StringPiece x )