diff options
Diffstat (limited to 'reference_model/src/ops/tensor_ops.cc')
-rw-r--r-- | reference_model/src/ops/tensor_ops.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/reference_model/src/ops/tensor_ops.cc b/reference_model/src/ops/tensor_ops.cc index 4a56093..862c640 100644 --- a/reference_model/src/ops/tensor_ops.cc +++ b/reference_model/src/ops/tensor_ops.cc @@ -407,7 +407,7 @@ ETensor1<int32_t> OpAvgPool2d<Dtype>::calculate_div_map_1d(int in_size, int out_ // adjust divisors on the left side for padding // We start at the leftmost output element, and remove pad_left - (index * stride) elements // until we have no more padding being used - for(int index = 0; (index < pad_left / stride) && (index < out_size); index++) { + for(int index = 0; (index <= pad_left / stride) && (index < out_size); index++) { int32_t adjust = pad_left - (index * stride); result(index) -= adjust; } |