mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 10:57:43 +00:00
Add layer info for check_health. Print subsequent infos from the same scope with "-->" instead of "INFO:" for clarity.
This commit is contained in:
+2
-2
@@ -141,7 +141,7 @@ namespace Learner
|
||||
void print(const std::string& prefix, ostream& s) const
|
||||
{
|
||||
s
|
||||
<< "INFO: "
|
||||
<< "--> "
|
||||
<< prefix << "_cross_entropy_eval = " << cross_entropy_eval / count
|
||||
<< " , " << prefix << "_cross_entropy_win = " << cross_entropy_win / count
|
||||
<< " , " << prefix << "_entropy_eval = " << entropy_eval / count
|
||||
@@ -722,7 +722,7 @@ namespace Learner
|
||||
|
||||
if (psv.size() && test_loss_sum.count > 0.0)
|
||||
{
|
||||
cout << "INFO: norm = " << sum_norm
|
||||
cout << "--> norm = " << sum_norm
|
||||
<< " , move accuracy = " << (move_accord_count * 100.0 / psv.size()) << "%"
|
||||
<< endl;
|
||||
|
||||
|
||||
@@ -99,8 +99,13 @@ namespace Eval::NNUE {
|
||||
const auto smallest_max_activation = *std::min_element(
|
||||
std::begin(max_activations_), std::end(max_activations_));
|
||||
|
||||
std::cout << "INFO: largest min activation = " << largest_min_activation
|
||||
<< ", smallest max activation = " << smallest_max_activation
|
||||
std::cout << "INFO (check_health):"
|
||||
<< " layer = " << LayerType::kLayerIndex
|
||||
<< " , name = " << LayerType::get_name()
|
||||
<< std::endl;
|
||||
|
||||
std::cout << "--> largest min activation = " << largest_min_activation
|
||||
<< " , smallest max activation = " << smallest_max_activation
|
||||
<< std::endl;
|
||||
|
||||
std::fill(std::begin(min_activations_), std::end(min_activations_),
|
||||
|
||||
@@ -330,25 +330,32 @@ namespace Eval::NNUE {
|
||||
|
||||
// Check if there are any problems with learning
|
||||
void check_health() {
|
||||
std::cout << "INFO: observed " << observed_features.count()
|
||||
<< " (out of " << kInputDimensions << ") features" << std::endl;
|
||||
std::cout << "INFO (check_health):"
|
||||
<< " layer = " << LayerType::kLayerIndex
|
||||
<< " , name = " << LayerType::get_name()
|
||||
<< std::endl;
|
||||
|
||||
std::cout << "--> observed " << observed_features.count()
|
||||
<< " (out of " << kInputDimensions << ") features"
|
||||
<< std::endl;
|
||||
|
||||
constexpr LearnFloatType kPreActivationLimit =
|
||||
std::numeric_limits<typename LayerType::WeightType>::max() /
|
||||
kWeightScale;
|
||||
|
||||
std::cout << "INFO: (min, max) of pre-activations = "
|
||||
std::cout << "--> (min, max) of pre-activations = "
|
||||
<< min_pre_activation_ << ", "
|
||||
<< max_pre_activation_ << " (limit = "
|
||||
<< kPreActivationLimit << ")" << std::endl;
|
||||
<< kPreActivationLimit << ")"
|
||||
<< std::endl;
|
||||
|
||||
const auto largest_min_activation = *std::max_element(
|
||||
std::begin(min_activations_), std::end(min_activations_));
|
||||
const auto smallest_max_activation = *std::min_element(
|
||||
std::begin(max_activations_), std::end(max_activations_));
|
||||
|
||||
std::cout << "INFO: largest min activation = " << largest_min_activation
|
||||
<< ", smallest max activation = " << smallest_max_activation
|
||||
std::cout << "--> largest min activation = " << largest_min_activation
|
||||
<< " , smallest max activation = " << smallest_max_activation
|
||||
<< std::endl;
|
||||
|
||||
std::fill(std::begin(min_activations_), std::end(min_activations_),
|
||||
|
||||
Reference in New Issue
Block a user