mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-24 19:16:49 +08:00
Accumulate clipping statistics to a 64 bit integer to prevent overflow for larger batch sizes.
This commit is contained in:
@@ -295,8 +295,6 @@ namespace Eval::NNUE {
|
||||
// number of samples in mini-batch
|
||||
IndexType batch_size_;
|
||||
|
||||
IndexType num_total_;
|
||||
|
||||
const LearnFloatType* input_;
|
||||
|
||||
// Trainer of the previous layer
|
||||
@@ -316,8 +314,8 @@ namespace Eval::NNUE {
|
||||
// Health check statistics
|
||||
LearnFloatType min_activations_[kOutputDimensions];
|
||||
LearnFloatType max_activations_[kOutputDimensions];
|
||||
IndexType num_clipped_;
|
||||
IndexType num_total_;
|
||||
uint64_t num_clipped_;
|
||||
uint64_t num_total_;
|
||||
|
||||
ThreadState() { reset(); }
|
||||
|
||||
|
||||
@@ -690,8 +690,6 @@ namespace Eval::NNUE {
|
||||
// layer to learn
|
||||
LayerType* const target_layer_;
|
||||
|
||||
IndexType num_total_;
|
||||
|
||||
// parameter
|
||||
alignas(kCacheLineSize) LearnFloatType biases_[kHalfDimensions];
|
||||
alignas(kCacheLineSize)
|
||||
@@ -717,8 +715,8 @@ namespace Eval::NNUE {
|
||||
alignas(kCacheLineSize) LearnFloatType max_activations_[kHalfDimensions];
|
||||
LearnFloatType min_pre_activation_;
|
||||
LearnFloatType max_pre_activation_;
|
||||
IndexType num_clipped_;
|
||||
IndexType num_total_;
|
||||
uint64_t num_clipped_;
|
||||
uint64_t num_total_;
|
||||
|
||||
ThreadStatState() { reset(); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user