Conv2d
Conv2D is a two-dimensional convolutional layer widely used in convolutional neural networks to process grid-like data such as images. It applies a set of learnable filters to an input tensor to produce a stack of output feature maps, one per filter. Each filter has a width and height (the kernel) and depth equal to the number of input channels. As the filter slides over the input with a defined stride, a dot product is computed between the kernel weights and the corresponding input region, producing a single value per position. Repeating this across all spatial positions yields the output feature maps, which are often passed through a nonlinearity.
Key parameters include in_channels, out_channels, kernel_size, stride, padding, dilation, groups, and bias. The number of output
Output size depends on input height and width, kernel size, padding, stride, and dilation. In general, each
In practice, Conv2D is implemented in major frameworks (for example, PyTorch uses Conv2d with in_channels, out_channels,