[CPU] ROIAlign: fixed misprint in input width value (#3853)

This commit is contained in:
Yury Gaydaychuk 2021-01-20 11:16:02 +03:00 committed by GitHub
parent 4e33dac7fa
commit 1aeb7fb089
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 3 deletions

View File

@ -248,7 +248,7 @@ void MKLDNNROIAlignNode::executeSpecified() {
} else {
sampleYHigh = sampleYLow + 1;
}
if (sampleXLow >= H - 1) {
if (sampleXLow >= W - 1) {
sampleXHigh = sampleXLow = W - 1;
sampleX = static_cast<float>(sampleXLow);
} else {

View File

@ -13,7 +13,8 @@ const auto ROIAlignCases_average = ::testing::Combine(
::testing::ValuesIn(
std::vector<std::vector<size_t>> {
{ 3, 8, 16, 16 },
{ 2, 1, 16, 16 }}),
{ 2, 1, 16, 16 },
{ 2, 1, 8, 16 }}),
::testing::Values(std::vector<size_t>{ 2, 4 }),
::testing::Values(2),
::testing::Values(2),
@ -30,7 +31,8 @@ const auto ROIAlignCases_max = ::testing::Combine(
::testing::ValuesIn(
std::vector<std::vector<size_t>> {
{ 2, 8, 20, 20 },
{ 2, 1, 20, 20 }}),
{ 2, 1, 20, 20 },
{ 2, 1, 10, 20 }}),
::testing::Values(std::vector<size_t>{ 2, 4 }),
::testing::Values(2),
::testing::Values(2),

View File

@ -143,6 +143,7 @@ const std::vector<std::string> modeVector = {
const std::vector<std::vector<size_t>> inputShapeVector = {
SizeVector({ 2, 18, 20, 20 }),
SizeVector({ 2, 4, 20, 20 }),
SizeVector({ 2, 4, 20, 40 }),
SizeVector({ 10, 1, 20, 20 })
};