mlpack 3.4.2
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
19namespace mlpack {
20namespace ann {
21
31template <
32 typename InputDataType = arma::mat,
33 typename OutputDataType = arma::mat
34>
36{
37 public:
42
49 template<typename InputType, typename TargetType>
50 double Forward(const InputType& input, const TargetType& target);
51
59 template<typename InputType, typename TargetType, typename OutputType>
60 void Backward(const InputType& input,
61 const TargetType& target,
62 OutputType& output);
63}; // class EmptyLoss
64
65} // namespace ann
66} // namespace mlpack
67
68// Include implementation.
69#include "empty_loss_impl.hpp"
70
71#endif
The empty loss does nothing, letting the user calculate the loss outside the model.
Definition: empty_loss.hpp:36
EmptyLoss()
Create the EmptyLoss object.
void Backward(const InputType &input, const TargetType &target, OutputType &output)
Ordinary feed backward pass of a neural network.
double Forward(const InputType &input, const TargetType &target)
Computes the Empty loss function.
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.