mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-29 20:14:01 +00:00
RoiAlign CPU EP add warning for max mode with samples != 1 (#12136)
* RoiAlign add warning about incorrect max summation when sample size not 1
This commit is contained in:
parent
f1047e0456
commit
742f843efc
1 changed files with 7 additions and 1 deletions
|
|
@ -29,7 +29,6 @@ class RoiAlignBase {
|
|||
} else {
|
||||
ORT_THROW("Invalid mode of value ", mode, " specified. It should be either avg or max");
|
||||
}
|
||||
mode_ = mode == "avg" ? RoiAlignMode::avg : RoiAlignMode::max;
|
||||
}
|
||||
|
||||
// output_height
|
||||
|
|
@ -64,6 +63,13 @@ class RoiAlignBase {
|
|||
else
|
||||
half_pixel_ = false;
|
||||
}
|
||||
|
||||
if (mode_ == RoiAlignMode::max && sampling_ratio_ != 1) {
|
||||
// TODO(fdwr): Issue #6146. ORT 1.13 will correct the incorrect summation of max mode with PR #7354.
|
||||
LOGS_DEFAULT(WARNING) << "The existing summation for max mode and sampling ratios besides 1 is incorrect "
|
||||
<< "and will be fixed in the next ORT 1.13 release. Thus the results of RoiAlign "
|
||||
<< "will be different.";
|
||||
}
|
||||
}
|
||||
|
||||
protected:
|
||||
|
|
|
|||
Loading…
Reference in a new issue