tensorflow::ops::SoftmaxCrossEntropyWithLogits
#include <nn_ops.h>
Вычисляет стоимость кросс-энтропии софтмакса и градиенты для обратного распространения.
Краткое описание
На вход подаются логиты, а не вероятности.
Аргументы:
- scope: Объект Scope
- features: матрица batch_size x num_classes
- labels: матрица batch_size x num_classes. Вызывающий должен убедиться, что каждый пакет меток представляет собой допустимое распределение вероятностей.
Возвращает:
-
Outputloss: Потери на пример (вектор batch_size). -
Outputbackprop: градиенты обратного распространения (матрица batch_size x num_classes).
| Конструкторы и деструкторы | |
|---|---|
SoftmaxCrossEntropyWithLogits(const ::tensorflow::Scope & scope, ::tensorflow::Input features, ::tensorflow::Input labels) |
| Общедоступные атрибуты | |
|---|---|
backprop | |
loss | |
operation | |
Общедоступные атрибуты
backprop
::tensorflow::Output backprop
loss
::tensorflow::Output loss
operation
Operation operation
Общедоступные функции
SoftmaxCrossEntropyWithLogits
SoftmaxCrossEntropyWithLogits( const ::tensorflow::Scope & scope, ::tensorflow::Input features, ::tensorflow::Input labels )
© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/softmax-cross-entropy-with-logits