empty_loss.hpp
Go to the documentation of this file.
1 
14 #ifndef MLPACK_METHODS_ANN_LOSS_FUNCTION_EMPTY_LOSS_HPP
15 #define MLPACK_METHODS_ANN_LOSS_FUNCTION_EMPTY_LOSS_HPP
16 
17 #include <mlpack/prereqs.hpp>
18 
19 namespace mlpack {
20 namespace ann {
21 
31 template <
32  typename InputDataType = arma::mat,
33  typename OutputDataType = arma::mat
34 >
35 class EmptyLoss
36 {
37  public:
41  EmptyLoss();
42 
50  template<typename PredictionType, typename TargetType>
51  double Forward(const PredictionType& input, const TargetType& target);
52 
61  template<typename PredictionType, typename TargetType, typename LossType>
62  void Backward(const PredictionType& prediction,
63  const TargetType& target,
64  LossType& loss);
65 }; // class EmptyLoss
66 
67 } // namespace ann
68 } // namespace mlpack
69 
70 // Include implementation.
71 #include "empty_loss_impl.hpp"
72 
73 #endif
void Backward(const PredictionType &prediction, const TargetType &target, LossType &loss)
Ordinary feed backward pass of a neural network.
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.
The empty loss does nothing, letting the user calculate the loss outside the model.
Definition: empty_loss.hpp:35
double Forward(const PredictionType &input, const TargetType &target)
Computes the Empty loss function.
EmptyLoss()
Create the EmptyLoss object.