mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-24 19:16:49 +08:00
Pass the new loss function to update_parameters
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user