mlpack  git-master
AddDecomposableGradientStatic< FunctionType, true, false > Class Template Reference

If we have a decomposable EvaluateWithGradient() but not a decomposable Gradient(), add a decomposable Gradient() method. More...

Static Public Member Functions

static void Gradient (const arma::mat &coordinates, const size_t begin, arma::mat &gradient, const size_t batchSize)
 Calculate the gradient and store it in the given matrix, starting at the given decomposable function index and using the given batch size. More...

 

Detailed Description


template
<
typename
FunctionType
>

class mlpack::optimization::AddDecomposableGradientStatic< FunctionType, true, false >

If we have a decomposable EvaluateWithGradient() but not a decomposable Gradient(), add a decomposable Gradient() method.

Definition at line 200 of file add_decomposable_gradient.hpp.

Member Function Documentation

◆ Gradient()

static void Gradient ( const arma::mat &  coordinates,
const size_t  begin,
arma::mat &  gradient,
const size_t  batchSize 
)
inlinestatic

Calculate the gradient and store it in the given matrix, starting at the given decomposable function index and using the given batch size.

Parameters
coordinatesCoordinates to evaluate the function at.
beginIndex of decomposable function to start at.
gradientMatrix to store the gradient into.
batchSizeNumber of decomposable functions to calculate for.

Definition at line 212 of file add_decomposable_gradient.hpp.


The documentation for this class was generated from the following file: