텐서플로우:: 작전:: 역직렬화Sparse
#include <sparse_ops.h> SparseTensor 객체를 역직렬화합니다.
요약
입력 serialized_sparse 는 [?, ?, ..., ?, 3] 모양을 가져야 하며, 마지막 차원은 직렬화된 SparseTensor 개체를 저장하고 다른 N 차원(N >= 0)은 배치에 해당합니다. 원래 SparseTensor 객체의 순위는 모두 일치해야 합니다. 최종 SparseTensor 생성되면 그 순위는 들어오는 SparseTensor 개체의 순위에 N을 더한 값입니다. 희소 텐서는 각 배치마다 하나씩 새로운 차원을 따라 연결되었습니다.
원래 차원에 대한 출력 SparseTensor 개체의 모양 값은 해당 차원에 대한 입력 SparseTensor 개체의 모양 값 전체에서 최대값입니다. 새 차원은 배치 크기와 일치합니다.
입력 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]인수:
- 범위: 범위 개체
- 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
sparse_indices
::tensorflow::Output sparse_indices
sparse_shape
::tensorflow::Output sparse_shape
희소 값
::tensorflow::Output sparse_values
공공 기능
역직렬화Sparse
DeserializeSparse( const ::tensorflow::Scope & scope, ::tensorflow::Input serialized_sparse, DataType dtype )