텐서플로우:: ops:: SparseFillEmptyRows
#include <sparse_ops.h> 입력 2차원 희소 SparseTensor 의 빈 행을 기본값으로 채웁니다.
요약
입력 SparseTensor 입력( indices , values , dense_shape ) 튜플로 표현됩니다. 출력 SparseTensor 동일한 dense_shape 가지지만 인덱스는 output_indices , 값은 output_values .
이 연산은 값이 없는 모든 행에 대해 하나의 항목을 삽입합니다. 인덱스는 [row, 0, ..., 0] 으로 생성되며 삽입되는 값은 default_value 입니다.
예를 들어 sp_input 형태가 [5, 6] 이고 비어 있지 않은 값을 가진다고 가정해 보겠습니다.
[0, 1]: a [0, 3]: b [2, 0]: c [3, 1]: d
1행과 4행이 비어 있으므로 출력은 [5, 6] 형태이며 값은 다음과 같습니다.
[0, 1]: a [0, 3]: b [1, 0]: default_value [2, 0]: c [3, 1]: d [4, 0]: default_value
출력 SparseTensor 행 우선 순서이며 입력과 동일한 형태를 갖습니다.
이 연산은 또한 [dense_shape[0]] 형태의 지표 벡터를 반환합니다.
empty_row_indicator[i] = True iff row i was an empty row.
그리고 역전파 중에 사용되는 [indices.shape[0]] 형태의 역 인덱스 맵 벡터가 있습니다.
reverse_index_map[j] = out_j s.t. indices[j, :] == output_indices[out_j, :]
논거:
- 범위: Scope 객체
- 인덱스: 2차원. 희소 텐서의 인덱스.
- 값: 1차원. 희소 텐서의 값.
- dense_shape: 1차원. 희소 텐서의 형태.
- default_value: 0차원. 입력 희소 텐서에서 누락된 행에 대해
[row, 0, ..., 0]위치에 삽입할 기본값입니다. output indices: 2차원. 채워진 희소 텐서의 인덱스입니다.
보고:
-
Outputoutput_indices -
Outputoutput_values: 1차원. 채워진 희소 텐서의 값입니다. - empty_row_indicator
Output: 1차원. 입력 희소 텐서에서 밀집 행이 누락되었는지 여부. - reverse_index_map
Output: 1차원. 입력 인덱스에서 출력 인덱스로의 맵입니다.
생성자와 소멸자 | |
|---|---|
SparseFillEmptyRows (const :: tensorflow::Scope & scope, :: tensorflow::Input indices, :: tensorflow::Input values, :: tensorflow::Input dense_shape, :: tensorflow::Input default_value) |
공개 속성 | |
|---|---|
empty_row_indicator | |
operation | |
output_indices | |
output_values | |
reverse_index_map | |
공개 속성
빈 행 표시기
::tensorflow::Output empty_row_indicator
작업
Operation operation
출력 인덱스
::tensorflow::Output output_indices
출력값
::tensorflow::Output output_values
역인덱스맵
::tensorflow::Output reverse_index_map
공공 기능
SparseFillEmptyRows
SparseFillEmptyRows( const ::tensorflow::Scope & scope, ::tensorflow::Input indices, ::tensorflow::Input values, ::tensorflow::Input dense_shape, ::tensorflow::Input default_value )