tensorflow:: ops:: SparseSoftmaxCrossEntropyWithLogits

#include <nn_ops.h>

ソフトマックス交差エントロピーのコストと勾配を計算し、逆伝播を行います。

まとめ

SoftmaxCrossEntropyWithLogitsとは異なり、この演算ではラベル確率の行列ではなく、特徴量の行ごとに1つのラベルを受け取ります。このラベルは、指定された行に対して確率1.0を持つものとみなされます。

入力値は確率ではなく、ロジットです。

議論:

  • スコープ:スコープオブジェクト
  • 特徴量: バッチサイズ × クラス数行列
  • labels: batch_size のベクトル (値は [0, num_classes)。これは、指定されたミニバッチエントリのラベルです。

返品:

  • Output損失:サンプルごとの損失(バッチサイズベクトル)。
  • バックプロパゲーションOutput :バックプロパゲーションされた勾配(バッチサイズ×クラス数行列)。

コンストラクターとデストラクタ

SparseSoftmaxCrossEntropyWithLogits (const :: tensorflow::Scope & scope, :: tensorflow::Input features, :: tensorflow::Input labels)

公開属性

backprop
loss
operation

公開属性

バックプロペラ

::tensorflow::Output backprop

損失

::tensorflow::Output loss

手術

Operation operation

公的機能

SparseSoftmaxCrossEntropyWithLogits

 SparseSoftmaxCrossEntropyWithLogits(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input features,
  ::tensorflow::Input labels
)