Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion onnxruntime/core/providers/cpu/object_detection/roialign.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down