diff --git a/src/dialect/onnx/onnx_ops.cpp b/src/dialect/onnx/onnx_ops.cpp index e597c9a..687a431 100644 --- a/src/dialect/onnx/onnx_ops.cpp +++ b/src/dialect/onnx/onnx_ops.cpp @@ -509,15 +509,15 @@ void ONNXConvNoBiasOp::inferShapes() { // argument. SmallVector kernelDims; if (auto kernelShape = getAttrOfType( - ONNXConvOp::getKernelShapeAttrName())) { + ONNXConvOp::getKernelShapeAttrName())) { if (kernelShape.getValue().size() != nDims) emitError("kernel_shape length incompatible with spatial dimensions."); for (int i = 0; i < nDims; ++i) - kernelDims[i] = - (kernelShape.getValue()[i]).cast().getInt(); + kernelDims.emplace_back( + (kernelShape.getValue()[i]).cast().getInt()); } else { for (int i = 0; i < nDims; ++i) - kernelDims[i] = weightShape[i + 2]; + kernelDims.emplace_back(weightShape[i + 2]); } // Subtract kernel dimensions from input data dimensions.