mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-25 19:46:55 +08:00
コンパイルエラーを修正した
This commit is contained in:
@@ -35,7 +35,7 @@ namespace {
|
||||
std::vector<Example> examples;
|
||||
|
||||
// examplesの排他制御をするMutex
|
||||
Mutex examples_mutex;
|
||||
std::mutex examples_mutex;
|
||||
|
||||
// ミニバッチのサンプル数
|
||||
uint64_t batch_size;
|
||||
@@ -158,7 +158,7 @@ void AddExample(Position& pos, Color rootColor,
|
||||
}
|
||||
}
|
||||
|
||||
std::lock_guard<Mutex> lock(examples_mutex);
|
||||
std::lock_guard<std::mutex> lock(examples_mutex);
|
||||
examples.push_back(std::move(example));
|
||||
}
|
||||
|
||||
@@ -170,7 +170,7 @@ void UpdateParameters(uint64_t epoch) {
|
||||
const auto learning_rate = static_cast<LearnFloatType>(
|
||||
get_eta() / batch_size);
|
||||
|
||||
std::lock_guard<Mutex> lock(examples_mutex);
|
||||
std::lock_guard<std::mutex> lock(examples_mutex);
|
||||
std::shuffle(examples.begin(), examples.end(), rng);
|
||||
while (examples.size() >= batch_size) {
|
||||
std::vector<Example> batch(examples.end() - batch_size, examples.end());
|
||||
|
||||
Reference in New Issue
Block a user