const ::caffe2::OperatorDef &op)
{
// dilation order: h w (not used)
- Shape stride_shape(getStrides(op));
+ std::vector<std::int32_t> strides = getStrides(op);
std::vector<int32_t> pad_before, pad_after;
std::tie(pad_before, pad_after) = getPadding(op);
// TODO handle properly kernel with layer multiplier
auto transposed_tensor = mir::transposeTensor<0, 1, 3, 2>(kernel_tensor);
auto kernel = createOp<ops::ConstantOp>(transposed_tensor)->getOutput(0);
- result = createOp<ops::DepthwiseConv2DOp>(inputs[0], kernel, stride_shape, pad_before,
- pad_after, DataFormat::NCHW)
+ result = createOp<ops::DepthwiseConv2DOp>(inputs[0], kernel, strides, pad_before, pad_after,
+ DataFormat::NCHW)
->getOutput(0);
}
else
kernel_tensor = fixGroupedKernel(num_groups, kernel_tensor);
kernel_tensor = transposeTensor<3, 0, 1, 2>(kernel_tensor);
auto kernel = createOp<ops::ConstantOp>(kernel_tensor)->getOutput(0);
- result = createOp<ops::Conv2DOp>(inputs[0], kernel, stride_shape, pad_before, pad_after,
- DataFormat::NCHW)
- ->getOutput(0);
+ result =
+ createOp<ops::Conv2DOp>(inputs[0], kernel, strides, pad_before, pad_after, DataFormat::NCHW)
+ ->getOutput(0);
}
if (op.input_size() > 2)