#include "AttributeHelpers.h"
#include "ConvPoolHelpers.h"
-#include "mir/ops/PoolOp.h"
+#include "mir/ops/AvgPool2DOp.h"
namespace mir_onnx
{
}
input = convertONNXToMIR(graph, input);
- auto result =
- createOp<mir::ops::PoolOp>(graph, input, mir::ops::PoolOp::PoolingType::AVG,
- mir::Shape(kernel_shape), mir::Shape(strides), padding_before,
- padding_after, mir::ops::PoolOp::BorderType::EMPTY)
- ->getOutput(0);
+ auto result = createOp<mir::ops::AvgPool2DOp>(graph, input, kernel_shape, strides, padding_before,
+ padding_after, false, mir::DataFormat::NHWC)
+ ->getOutput(0);
result = convertMIRToONNX(graph, result);
context->setNodeOutputs(onnx_node, {result});
#include "AttributeHelpers.h"
#include "ConvPoolHelpers.h"
-#include "mir/ops/PoolOp.h"
+#include "mir/ops/MaxPool2DOp.h"
namespace mir_onnx
{
}
input = convertONNXToMIR(graph, input);
- auto result =
- createOp<mir::ops::PoolOp>(graph, input, mir::ops::PoolOp::PoolingType::MAX,
- mir::Shape(kernel_shape), mir::Shape(strides), padding_before,
- padding_after, mir::ops::PoolOp::BorderType::EMPTY)
- ->getOutput(0);
+ auto result = createOp<mir::ops::MaxPool2DOp>(graph, input, kernel_shape, strides, padding_before,
+ padding_after, mir::DataFormat::NHWC)
+ ->getOutput(0);
result = convertMIRToONNX(graph, result);
context->setNodeOutputs(onnx_node, {result});