Removed LOSS_FUNCTION_IS_CROSS_ENTOROPY_FOR_VALUE macro.

This commit is contained in:
nodchip
2020-09-09 00:11:11 +09:00
parent f52fbf8006
commit ef1601218d
2 changed files with 1 additions and 17 deletions

View File

@@ -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

View File

@@ -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.