Skip to content

Commit

Permalink
Fix bug in ResetAllBatches
Browse files Browse the repository at this point in the history
  • Loading branch information
lauracanalini committed Mar 2, 2022
1 parent c8f3c10 commit 3d2a1cf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions modules/eddl/src/support_eddl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,12 @@ void DLDataset::ResetAllBatches(bool shuffle)
{
fill(current_batch_.begin(), current_batch_.end(), 0);

if (shuffle) {
for (int split_index = 0; split_index < vsize(split_); ++split_index) {
for (int split_index = 0; split_index < vsize(split_); ++split_index) {
if (shuffle) {
std::shuffle(begin(GetSplit(split_index)), end(GetSplit(split_index)), re_);
for (auto& tc : splits_tc_[split_index]) {
tc.Reset();
}
}
for (auto& tc : splits_tc_[split_index]) {
tc.Reset();
}
}
}
Expand Down

0 comments on commit 3d2a1cf

Please sign in to comment.