diff --git a/src/lstm/plumbing.cpp b/src/lstm/plumbing.cpp index be716aa0ab..7fbf802f87 100644 --- a/src/lstm/plumbing.cpp +++ b/src/lstm/plumbing.cpp @@ -174,7 +174,7 @@ float* Plumbing::LayerLearningRatePtr(const char* id) const { ASSERT_HOST(*next_id == ':'); return plumbing->LayerLearningRatePtr(next_id + 1); } - if (index < 0 || index >= learning_rates_.size()) return nullptr; + if (index >= learning_rates_.size()) return nullptr; return &learning_rates_[index]; }