tensorflow :: ops :: SparseFillEmptyRows
#include <sparse_ops.h>
入力2- SparseTensor
空の行をデフォルト値でSparseTensor
ます。
概要
入力SparseTensor
は、入力のタプル( indices
、 values
、 dense_shape
)を介して表されvalues
。出力SparseTensor
は同じdense_shape
が、インデックスoutput_indices
と値output_values
あります。
この操作は、値を持たないすべての行に1つのエントリを挿入します。インデックスは[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
順序になり、入力と同じ形状になります。
この操作は、 [dense_shape[0]]
ような[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_indices -
Output
output_values:1-D。満たされたスパーステンソルの値。 - empty_row_indicatorを
Output
ます: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 |
パブリック属性
empty_row_indicator
::tensorflow::Output empty_row_indicator
操作
Operation operation
output_indices
::tensorflow::Output output_indices
output_values
::tensorflow::Output output_values
reverse_index_map
::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 )