mlpack
empty_loss_impl.hpp
Go to the documentation of this file.
1 
14 #ifndef MLPACK_METHODS_ANN_LOSS_FUNCTIONS_EMPTY_LOSS_IMPL_HPP
15 #define MLPACK_METHODS_ANN_LOSS_FUNCTIONS_EMPTY_LOSS_IMPL_HPP
16 
17 // In case it hasn't yet been included.
18 #include "empty_loss.hpp"
19 
20 namespace mlpack {
21 namespace ann {
22 
23 template<typename InputDataType, typename OutputDataType>
25 {
26  // Nothing to do here.
27 }
28 
29 template<typename InputDataType, typename OutputDataType>
30 template<typename PredictionType, typename TargetType>
32  const PredictionType& /* prediction */, const TargetType& /* target */)
33 {
34  return 0;
35 }
36 
37 template<typename InputDataType, typename OutputDataType>
38 template<typename PredictionType, typename TargetType, typename LossType>
40  const PredictionType& /* prediction */,
41  const TargetType& target,
42  LossType& loss)
43 {
44  loss = target;
45 }
46 
47 } // namespace ann
48 } // namespace mlpack
49 
50 #endif
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: cv.hpp:1
void Backward(const PredictionType &prediction, const TargetType &target, LossType &loss)
Ordinary feed backward pass of a neural network.
Definition: empty_loss_impl.hpp:39
EmptyLoss()
Create the EmptyLoss object.
Definition: empty_loss_impl.hpp:24
double Forward(const PredictionType &input, const TargetType &target)
Computes the Empty loss function.
Definition: empty_loss_impl.hpp:31