テンソルフロー::作戦::スパースソフトマックス
#include <sparse_ops.h>バッチ化された ND SparseTensorにソフトマックスを適用します。
まとめ
入力は、論理形状[..., B, C] ( N >= 2 ) と正規の辞書編集順にソートされたインデックスを持つ ND SparseTensor を表します。
この操作は、通常のtf.nn.softmax()を形状[B, C]の各最内論理部分行列に適用するのと同等ですが、暗黙的にゼロの要素が関与しないという点が異なります。具体的には、アルゴリズムは次と同等です。
 (1) tf.nn.softmax()を、サイズ C 次元に沿った、形状[B, C]の最も内側の各部分行列の高密度ビューに適用します。 (2) 元の暗黙的にゼロの位置をマスクアウトします。 (3) 残りの要素を繰り込みます。
したがって、 SparseTensor結果は、まったく同じ非ゼロのインデックスと形状を持ちます。
引数:
- スコープ:スコープオブジェクト
- sp_indices: 2 次元。 SparseTensor 内の空でない値のインデックスを正規の順序で持つNNZ x R行列。
-  sp_values: 1-D。 sp_indicesに対応するNNZ空でない値。
- sp_shape: 1-D。入力 SparseTensor の形状。
戻り値:
-  Output: 1-D。SparseTensorの結果のNNZ値。
| コンストラクターとデストラクター | |
|---|---|
| SparseSoftmax (const :: tensorflow::Scope & scope, :: tensorflow::Input sp_indices, :: tensorflow::Input sp_values, :: tensorflow::Input sp_shape) | 
| パブリック属性 | |
|---|---|
| operation | |
| output | |
| 公共機能 | |
|---|---|
| node () const | ::tensorflow::Node * | 
| operator::tensorflow::Input () const | |
| operator::tensorflow::Output () const | |
パブリック属性
手術
Operation operation
出力
::tensorflow::Output output
公共機能
スパースソフトマックス
SparseSoftmax( const ::tensorflow::Scope & scope, ::tensorflow::Input sp_indices, ::tensorflow::Input sp_values, ::tensorflow::Input sp_shape )
ノード
::tensorflow::Node * node() const
演算子::tensorflow::入力
operator::tensorflow::Input() const
演算子::tensorflow::出力
operator::tensorflow::Output() const