Reference code is from test_conformance/test_tensor_nn.c line:1953.
const int x_begin = CLAMP((size_t)(roi_x0 + dx_begin), 0, data_w);
Test case TensorNN.ROIPoolingLayer/2/S8 shows that there is a condition when (roi_x0 + dx_begin) is < 0. However, in equation, it is explicitly converted to size_t, which cause incorrect result of x_begin.
Reference code is from test_conformance/test_tensor_nn.c line:1953.
const int x_begin = CLAMP((size_t)(roi_x0 + dx_begin), 0, data_w);
Test case TensorNN.ROIPoolingLayer/2/S8 shows that there is a condition when (roi_x0 + dx_begin) is < 0. However, in equation, it is explicitly converted to size_t, which cause incorrect result of x_begin.