include_object_detection_kernels.h#

namespace ONNX_LIGHT_NAMESPACE#
namespace onnx_backend_test#
namespace kernel#
class RoiAlign#
#include <include_object_detection_kernels.h>

Reference RoiAlign kernel restricted to FLOAT inputs/outputs.

Public Functions

inline explicit RoiAlign(const KernelContext &ctx)#
Tensor operator()(const Tensor &x, const Tensor &rois, const Tensor &batch_indices, const Attributes &attrs) const#
void operator()(const Tensor &x, const Tensor &rois, const Tensor &batch_indices, const Attributes &attrs, Tensor &output) const#

Public Static Functions

static inline constexpr bool CanRunInPlace() noexcept#

Output element layout (num_rois, C, output_height, output_width) fundamentally differs from any input, so storage cannot be shared.

Private Members

KernelContext ctx_#
struct Attributes#
#include <include_object_detection_kernels.h>

Attributes carried by the ONNX RoiAlign operator. Defaults match the opset-16 schema; coordinate_transformation_mode should be set to "output_half_pixel" to reproduce the legacy opset-10 behaviour.

Public Members

std::string mode = "avg"#
int64_t output_height = 1#
int64_t output_width = 1#
int64_t sampling_ratio = 0#
float spatial_scale = 1.0f#
std::string coordinate_transformation_mode = "half_pixel"#