텐서플로우:: ops:: DeserializeSparse
#include <sparse_ops.h> SparseTensor 객체를 역직렬화합니다.
요약
입력 serialized_sparse 는 [?, ?, ..., ?, 3] 의 형태를 가져야 하며, 마지막 차원에는 직렬화된 SparseTensor 객체가 저장되고 나머지 N개 차원(N >= 0)은 각각 배치에 해당합니다. 원래 SparseTensor 객체들의 랭크는 모두 일치해야 합니다. 최종 SparseTensor 생성될 때, 그 랭크는 입력 SparseTensor 객체들의 랭크에 N을 더한 값이 됩니다. 각 배치에 대해 새로운 차원을 따라 희소 텐서들이 연결되기 때문입니다.
출력 SparseTensor 객체의 원래 차원에 대한 shape 값은 입력 SparseTensor 객체의 해당 차원에 대한 shape 값 중 최댓값입니다. 새로운 차원은 배치 크기와 일치합니다.
입력 SparseTensor 객체의 인덱스는 표준 사전식 순서로 정렬되어 있다고 가정합니다. 만약 그렇지 않다면, 이 단계 후에 SparseReorder 실행하여 인덱스 순서를 복원하십시오.
예를 들어, 직렬화된 입력이 두 개의 원래 SparseTensor 객체를 나타내는 [2 x 3] 행렬인 경우:
index = [ 0]
[10]
[20]
values = [1, 2, 3]
shape = [50]그리고
index = [ 2]
[10]
values = [4, 5]
shape = [30] 그러면 최종적으로 역직렬화된 SparseTensor 다음과 같습니다.
index = [0 0]
[0 10]
[0 20]
[1 2]
[1 10]
values = [1, 2, 3, 4, 5]
shape = [2 50]논거:
- 범위: Scope 객체
- serialized_sparse: 직렬화된
SparseTensor객체입니다. 마지막 차원은 3개의 열로 구성되어야 합니다. - dtype: 직렬화된
SparseTensor객체의dtype.
보고:
생성자와 소멸자 | |
|---|---|
DeserializeSparse (const :: tensorflow::Scope & scope, :: tensorflow::Input serialized_sparse, DataType dtype) |
공개 속성 | |
|---|---|
operation | |
sparse_indices | |
sparse_shape | |
sparse_values | |
공개 속성
작업
Operation operation
희소 인덱스
::tensorflow::Output sparse_indices
희소한 모양
::tensorflow::Output sparse_shape
희소값
::tensorflow::Output sparse_values
공공 기능
희소 역직렬화
DeserializeSparse( const ::tensorflow::Scope & scope, ::tensorflow::Input serialized_sparse, DataType dtype )