コンパイルエラーを修正した

This commit is contained in:
nodchip
2020-06-08 23:46:06 +09:00
parent 5c936572e9
commit 33772a0418
4 changed files with 29 additions and 28 deletions

View File

@@ -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());