mlpack 3.4.2
sigmoid_cross_entropy_error.hpp
Go to the documentation of this file.
1
13#ifndef MLPACK_METHODS_ANN_LOSS_FUNCTION_SIGMOID_CROSS_ENTROPY_ERROR_HPP
14#define MLPACK_METHODS_ANN_LOSS_FUNCTION_SIGMOID_CROSS_ENTROPY_ERROR_HPP
15
16#include <mlpack/prereqs.hpp>
17
18namespace mlpack {
19namespace ann {
20
48template <
49 typename InputDataType = arma::mat,
50 typename OutputDataType = arma::mat
51>
53{
54 public:
59
66 template<typename InputType, typename TargetType>
67 inline typename InputType::elem_type Forward(const InputType& input,
68 const TargetType& target);
76 template<typename InputType, typename TargetType, typename OutputType>
77 inline void Backward(const InputType& input,
78 const TargetType& target,
79 OutputType& output);
80
82 OutputDataType& OutputParameter() const { return outputParameter; }
84 OutputDataType& OutputParameter() { return outputParameter; }
85
89 template<typename Archive>
90 void serialize(Archive& ar, const unsigned int /* version */);
91
92 private:
94 OutputDataType outputParameter;
95}; // class SigmoidCrossEntropy
96
97} // namespace ann
98} // namespace mlpack
99
100// Include implementation.
101#include "sigmoid_cross_entropy_error_impl.hpp"
102
103#endif
The SigmoidCrossEntropyError performance function measures the network's performance according to the...
OutputDataType & OutputParameter() const
Get the output parameter.
SigmoidCrossEntropyError()
Create the SigmoidCrossEntropyError object.
void Backward(const InputType &input, const TargetType &target, OutputType &output)
Ordinary feed backward pass of a neural network.
InputType::elem_type Forward(const InputType &input, const TargetType &target)
Computes the Sigmoid CrossEntropy Error functions.
OutputDataType & OutputParameter()
Modify the output parameter.
void serialize(Archive &ar, const unsigned int)
Serialize the layer.
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: cv.hpp:1
The core includes that mlpack expects; standard C++ includes and Armadillo.