Skip to content

Commit a2c15e1

Browse files
authored
Fix layer index in debug dumps (#228)
1 parent 4220c19 commit a2c15e1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

include/graph/graph.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ class Graph {
249249
tensors_.push_back(outten_[0]);
250250
#endif
251251
#ifdef ENABLE_STATISTIC_WEIGHTS
252-
weights_.push_back(layers_[i]->get_weights());
252+
weights_.push_back(layers_[current_layer]->get_weights());
253253
#endif
254254

255255
inten_ = outten_;
@@ -295,7 +295,7 @@ class Graph {
295295
auto elapsed =
296296
std::chrono::duration_cast<std::chrono::milliseconds>(end - start);
297297
time_.push_back(static_cast<int>(elapsed.count()));
298-
time_layer_.push_back(layers_[i]->getName());
298+
time_layer_.push_back(layers_[current_layer]->getName());
299299
#endif
300300
}
301301

0 commit comments

Comments
 (0)