Merge branch 'master' into test-fixes
This commit is contained in:
@@ -191,6 +191,7 @@ class FFN
|
||||
/**
|
||||
* Evaluate the feedforward network with the given parameters.
|
||||
* This function is usually called by the optimizer to train the model.
|
||||
* This just calls the overload of EvaluateWithGradient() with batchSize = 1.
|
||||
*
|
||||
* @param parameters Matrix model parameters.
|
||||
* @param gradient Matrix to output gradient into.
|
||||
@@ -201,8 +202,7 @@ class FFN
|
||||
/**
|
||||
* Evaluate the feedforward network with the given parameters, but using only
|
||||
* a number of data points. This is useful for optimizers such as SGD, which
|
||||
* require a separable objective function. This just calls the overload of
|
||||
* Evaluate() with deterministic = true.
|
||||
* require a separable objective function.
|
||||
*
|
||||
* @param parameters Matrix model parameters.
|
||||
* @param begin Index of the starting point to use for objective function
|
||||
|
||||
@@ -183,8 +183,7 @@ class RNN
|
||||
|
||||
/**
|
||||
* Evaluate the recurrent neural network with the given parameters. This
|
||||
* function is usually called by the optimizer to train the model. This just
|
||||
* calls the other overload of Evaluate() with deterministic = true.
|
||||
* function is usually called by the optimizer to train the model.
|
||||
*
|
||||
* @param parameters Matrix model parameters.
|
||||
* @param begin Index of the starting point to use for objective function
|
||||
|
||||
@@ -304,13 +304,10 @@ EvaluateWithGradient(const arma::mat& /* parameters */,
|
||||
responseSeq = seqNum;
|
||||
}
|
||||
|
||||
if (!deterministic)
|
||||
for (size_t l = 0; l < network.size(); ++l)
|
||||
{
|
||||
for (size_t l = 0; l < network.size(); ++l)
|
||||
{
|
||||
boost::apply_visitor(SaveOutputParameterVisitor(
|
||||
std::move(moduleOutputParameter)), network[l]);
|
||||
}
|
||||
boost::apply_visitor(SaveOutputParameterVisitor(
|
||||
std::move(moduleOutputParameter)), network[l]);
|
||||
}
|
||||
|
||||
performance += outputLayer.Forward(std::move(boost::apply_visitor(
|
||||
|
||||
Reference in New Issue
Block a user