텐서플로우:: ops:: SparseReshape
#include <sparse_ops.h>SparseTensor의 값을 새로운 밀집형 형태로 표현하도록 재구성합니다.
요약
이 연산은 표현된 밀집 텐서에 대한 reshape와 동일한 의미를 가집니다. input_indices 는 요청된 new_shape 기반으로 다시 계산됩니다.
new_shape 의 한 구성 요소가 특수 값인 -1인 경우, 전체 밀집 크기가 일정하게 유지되도록 해당 차원의 크기가 계산됩니다. new_shape 의 구성 요소 중 -1인 것은 최대 하나입니다. new_shape 에 의해 암시되는 밀집 요소의 개수는 input_shape 에 의해 원래 암시되는 밀집 요소의 개수와 동일해야 합니다.
형태 변경은 SparseTensor의 값 순서에 영향을 미치지 않습니다.
입력 텐서의 랭크가 R_in 이고 비어 있지 않은 값이 N 이며 new_shape 길이가 R_out 이면 input_indices 는 shape [N, R_in] 이고 input_shape 길이가 R_in 이며 output_indices 는 shape [N, R_out] 이고 output_shape 길이가 R_out 입니다.
논거:
- 범위: Scope 객체
- input_indices: SparseTensor에서 비어 있지 않은 값의 인덱스를 포함하는 2차원
N x R_in행렬입니다. - input_shape: 1차원. 입력 SparseTensor의 밀집 형태를 가진
R_in벡터입니다. - new_shape: 1차원. 요청된 새로운 밀집 형상을 가진
R_out벡터.
보고:
-
Outputoutput_indices: 2차원N x R_out행렬로, 출력 SparseTensor에서 비어 있지 않은 값의 업데이트된 인덱스를 포함합니다. -
Outputoutput_shape: 1차원. 출력 SparseTensor의 전체 밀집 형태를 가진R_out벡터입니다. 이는new_shape와 동일하지만 -1 차원이 채워져 있습니다.
생성자와 소멸자 | |
|---|---|
SparseReshape (const :: tensorflow::Scope & scope, :: tensorflow::Input input_indices, :: tensorflow::Input input_shape, :: tensorflow::Input new_shape) |
공개 속성 | |
|---|---|
operation | |
output_indices | |
output_shape | |
공개 속성
작업
Operation operation
출력 인덱스
::tensorflow::Output output_indices
출력 형태
::tensorflow::Output output_shape
공공 기능
희소 재구성
SparseReshape( const ::tensorflow::Scope & scope, ::tensorflow::Input input_indices, ::tensorflow::Input input_shape, ::tensorflow::Input new_shape )