텐서플로우:: 작전:: SparseFillEmpty행

#include <sparse_ops.h>

입력 2-D SparseTensor 의 빈 행을 기본값으로 채웁니다.

요약

입력 SparseTensor 입력 튜플( indices , values , dense_shape )을 통해 표현됩니다. 출력 SparseTensor dense_shape 동일하지만 index는 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는 비어 있으므로 출력은 값이

[0, 1]: a
[0, 3]: b
[1, 0]: default_value
[2, 0]: c
[3, 1]: d
[4, 0]: default_value
[5, 6] 모양이 됩니다.

출력 SparseTensor 행 우선 순서이며 입력과 동일한 모양을 갖습니다.

이 작업은 또한

empty_row_indicator[i] = True iff row i was an empty row.
과 같은 [dense_shape[0]] 모양의 표시기 벡터를 반환합니다.

그리고 역전파 중에 사용되는 [indices.shape[0]] 모양의 역방향 인덱스 맵 벡터,

reverse_index_map[j] = out_j s.t. indices[j, :] == output_indices[out_j, :]

인수:

  • 범위: 범위 개체
  • 인덱스: 2-D. 희소 텐서의 인덱스.
  • 값: 1-D. 희소 텐서의 값.
  • 밀도_모양: 1-D. 희소 텐서의 모양.
  • default_value: 0-D. 입력 희소 텐서에서 누락된 행에 대해 위치 [row, 0, ..., 0] 에 삽입할 기본값입니다. 출력 인덱스: 2-D. 채워진 희소 텐서의 인덱스.

보고:

  • Output 출력_인덱스
  • Output 출력_값: 1-D. 채워진 희소 텐서의 값.
  • Output empty_row_indicator: 1-D. 입력 희소 텐서에 조밀한 행이 누락되었는지 여부.
  • Output reverse_index_map: 1-D. 입력 인덱스에서 출력 인덱스로의 맵입니다.

생성자와 소멸자

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

reverse_index_map

::tensorflow::Output reverse_index_map

공공 기능

SparseFillEmpty행

 SparseFillEmptyRows(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input indices,
  ::tensorflow::Input values,
  ::tensorflow::Input dense_shape,
  ::tensorflow::Input default_value
)