[GPU] Fix out of range check for pooling (#17612)
* [GPU] Fix out of range check for pooling * [GPU] Fix out of range check for pooling
This commit is contained in:
parent
4eebd3a976
commit
54bbc9e603
@ -131,7 +131,7 @@ public:
|
||||
// adjusted to that, to work properly this calculation must take pad_end into account.
|
||||
auto dynamic_mode = false;
|
||||
for (size_t i = 0; i < spatial_rank; i++) {
|
||||
dynamic_mode |= (((output_layout.spatial(i) - 1) * stride[spatial_rank - i - 1]) + primitive->size[spatial_rank - i - 1]) >
|
||||
dynamic_mode |= (((output_layout.spatial(i) - 1) * stride[spatial_rank - i - 1]) + kernel[spatial_rank - i - 1]) >
|
||||
static_cast<size_t>(pads_end[spatial_rank - i - 1] + pads_begin[spatial_rank - i - 1] + input_layout.spatial(i));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user