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 
18 namespace mlpack {
19 namespace ann {
20 
48 template <
49  typename InputDataType = arma::mat,
50  typename OutputDataType = arma::mat
51 >
53 {
54  public:
59 
66  template<typename InputType, typename TargetType>
67  inline double 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
void Backward(const InputType &&input, const TargetType &&target, OutputType &&output)
Ordinary feed backward pass of a neural network.
strip_type.hpp
Definition: add_to_po.hpp:21
SigmoidCrossEntropyError()
Create the SigmoidCrossEntropyError object.
OutputDataType & OutputParameter()
Modify the output parameter.
The core includes that mlpack expects; standard C++ includes and Armadillo.
double Forward(const InputType &&input, const TargetType &&target)
Computes the Sigmoid CrossEntropy Error functions.
void serialize(Archive &ar, const unsigned int)
Serialize the layer.
OutputDataType & OutputParameter() const
Get the output parameter.
The SigmoidCrossEntropyError performance function measures the network&#39;s performance according to the...