xlnstorch.csrc.conv2d_forward#
- xlnstorch.csrc.conv2d_forward(x, weight, bias, base, stride_h, stride_w, padding_h, padding_w, dilation_h, dilation_w, groups)#
Perform LNS 2D convolution.
- Parameters:
x (torch.Tensor) – The input tensor in LNS format (torch.int64).
weight (torch.Tensor) – The convolution kernel in LNS format (torch.int64).
bias (torch.Tensor) – The bias tensor in LNS format (torch.int64).
base (torch.Tensor) – The base for the LNS representation.
stride_h (int) – The vertical stride of the convolution.
stride_w (int) – The horizontal stride of the convolution.
padding_h (int) – The vertical padding applied to the input tensor.
padding_w (int) – The horizontal padding applied to the input tensor.
dilation_h (int) – The vertical dilation factor for the convolution.
dilation_w (int) – The horizontal dilation factor for the convolution.
groups (int) – The number of groups for the convolution.
- Returns:
The output tensor in LNS format (torch.int64) after convolution.
- Return type: