Pass the new loss function to update_parameters

This commit is contained in:
Tomasz Sobczyk
2020-11-29 11:55:15 +01:00
committed by nodchip
parent 5a58eb803a
commit b71d1e8620
2 changed files with 6 additions and 2 deletions

View File

@@ -195,8 +195,11 @@ namespace Eval::NNUE {
uint64_t epoch,
bool verbose,
double learning_rate,
Learner::CalcGradFunc calc_grad)
Learner::CalcGradFunc calc_grad,
Learner::CalcLossFunc calc_loss)
{
using namespace Learner::Autograd::UnivariateStatic;
assert(batch_size > 0);
learning_rate /= batch_size;

View File

@@ -38,7 +38,8 @@ namespace Eval::NNUE {
uint64_t epoch,
bool verbose,
double learning_rate,
Learner::CalcGradFunc calc_grad);
Learner::CalcGradFunc calc_grad,
Learner::CalcLossFunc calc_loss);
// Check if there are any problems with learning
void check_health();