tensorflow::ops::SoftmaxCrossEntropyWithLogits
#include <nn_ops.h>
Вычисляет стоимость кросс-энтропии softmax и градиенты для обратного распространения.
Summary
На вход подаются не вероятности, а логиты.
Аргументы:
- 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/r2.3/api_docs/cc/class/tensorflow/ops/softmax-cross-entropy-with-logits