Fix LSTMTrainerTest.BidiTest

Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2021-07-04 18:41:19 +02:00
parent 915c29e3c8
commit 767fb5a177

View File

@ -140,14 +140,14 @@ public:
}
}
void Init(int size, int reserve, NetworkScratch *scratch) {
void Init(int /*size*/, int reserve, NetworkScratch *scratch) {
if (scratch_space_ != nullptr && vec_ != nullptr) {
scratch_space_->vec_stack_.Return(vec_);
}
scratch_space_ = scratch;
vec_ = scratch_space_->vec_stack_.Borrow();
vec_->reserve(reserve);
vec_->resize(size);
// TODO: optimize.
vec_->resize(reserve);
data_ = &(*vec_)[0];
}