Computes the softmax activation function. More...
#include <shark/Models/NeuronLayers.h>
Public Types | |
typedef EmptyState | State |
Public Member Functions | |
template<class Arg , class Device > | |
void | evalInPlace (blas::vector_expression< Arg, Device > &arg) const |
template<class Arg , class Device > | |
void | evalInPlace (blas::matrix_expression< Arg, Device > &arg) const |
template<class Arg , class Device > | |
void | evalInPlace (blas::matrix_expression< Arg, Device > &arg, State &) const |
template<class Output , class Derivative > | |
void | multiplyDerivative (Output const &output, Derivative &der, State const &s) const |
Computes the softmax activation function.
\[ f_i(x)= \exp(x_i) \ \sum_j \exp(x_j) \]
computes the exponential function of the inputs and normalizes the outputs to sum to one. This is the NormalizerNeuron just without the constraint of values being positive
Definition at line 218 of file NeuronLayers.h.
typedef EmptyState shark::SoftmaxNeuron< VectorType >::State |
Definition at line 219 of file NeuronLayers.h.
|
inline |
Definition at line 228 of file NeuronLayers.h.
|
inline |
Definition at line 234 of file NeuronLayers.h.
References shark::SoftmaxNeuron< VectorType >::evalInPlace().
|
inline |
Definition at line 222 of file NeuronLayers.h.
Referenced by shark::SoftmaxNeuron< VectorType >::evalInPlace().
|
inline |
Definition at line 239 of file NeuronLayers.h.