Make all grad related functions in learn static. Pass calc_grad as a parameter.

This commit is contained in:
Tomasz Sobczyk
2020-10-27 14:47:50 +09:00
committed by nodchip
parent e4868cb59e
commit cde6ec2bf2
4 changed files with 23 additions and 30 deletions
+2 -2
View File
@@ -64,10 +64,10 @@ namespace Learner
// rmse calculation is done in one thread, so it takes some time, so reducing the output is effective.
constexpr std::size_t LEARN_RMSE_OUTPUT_INTERVAL = 1;
double calc_grad(Value shallow, const PackedSfenValue& psv);
// Learning from the generated game record
void learn(std::istringstream& is);
using CalcGradFunc = double(Value, Value, int, int);
}
#endif // ifndef _LEARN_H_