Hi,
I’m trying to use the C++ Extension tutorial to write a custom convolution function for use in python.
torch::Tensor conv2d_forward(
    const torch::Tensor input,
    const torch::Tensor weight,
    const torch::Tensor bias,
    torch::ExpandingArray<2> stride,
    torch::ExpandingArray<2> padding,
    torch::ExpandingArray<2> dilation,
    int64_t groups
){
    return F::conv2d(input,weight,F::Conv2dFuncOptions().bias(bias).stride(stride).padding(padding).dilation(dilation).groups(groups));
}

I was hoping that I could then call this function using pybind like this:
torchexplain_cpp.conv2d_forward(input, weight, bias, (1,1),(1,1),(1,1),1)

But I get an incompatible arguments error regarding the tuples.
How would I appropriately pass python tuples OR ints to the function?
Thank you