mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-25 11:36:51 +08:00
Removed LOSS_FUNCTION_IS_CROSS_ENTOROPY_FOR_VALUE macro.
This commit is contained in:
@@ -9,9 +9,6 @@
|
||||
// Select the objective function
|
||||
// ----------------------
|
||||
|
||||
// A version in which the objective function is cross entropy, but the win rate function is not passed
|
||||
// #define LOSS_FUNCTION_IS_CROSS_ENTOROPY_FOR_VALUE
|
||||
|
||||
// elmo (WCSC27) method
|
||||
// #define LOSS_FUNCTION_IS_ELMO_METHOD
|
||||
|
||||
@@ -116,9 +113,7 @@ typedef float LearnFloatType;
|
||||
|
||||
#define LOSS_FUNCTION_IS_ELMO_METHOD
|
||||
|
||||
#if defined(LOSS_FUNCTION_IS_CROSS_ENTOROPY_FOR_VALUE)
|
||||
#define LOSS_FUNCTION "CROSS_ENTOROPY_FOR_VALUE"
|
||||
#elif defined(LOSS_FUNCTION_IS_ELMO_METHOD)
|
||||
#if defined(LOSS_FUNCTION_IS_ELMO_METHOD)
|
||||
#define LOSS_FUNCTION "ELMO_METHOD(WCSC27)"
|
||||
#endif
|
||||
|
||||
|
||||
@@ -163,17 +163,6 @@ namespace Learner
|
||||
return ((y2 - y1) / epsilon) / winning_probability_coefficient;
|
||||
}
|
||||
|
||||
#if defined ( LOSS_FUNCTION_IS_CROSS_ENTOROPY_FOR_VALUE )
|
||||
double calc_grad(Value deep, Value shallow, const PackedSfenValue& psv)
|
||||
{
|
||||
// Version that does not pass the winning percentage function
|
||||
// This, unless EVAL_LIMIT is set low, trying to
|
||||
// match the evaluation value with the shape of the end stage
|
||||
// eval may exceed the range of eval.
|
||||
return shallow - deep;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined ( LOSS_FUNCTION_IS_ELMO_METHOD )
|
||||
|
||||
// A constant used in elmo (WCSC27). Adjustment required.
|
||||
|
||||
Reference in New Issue
Block a user