depthwise_conv2d
depthwise_conv2d
¶
Module for depth-wise 2D Convolution layer.
DepthwiseConv2D
¶
Bases: Module
A depth-wise 2D convolution applies a single convolutional filter to each input channel independently, without mixing channels (unlike standard convolution).
Source code in src/versatil/models/layers/convolution/depthwise_conv2d.py
forward
¶
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
Tensor
|
input of shape (batch, height, width, channels). |
required |
Returns:
| Name | Type | Description |
|---|---|---|
output |
Tensor
|
tensor after applying depth-wise spatial convolutions, shape (batch, height, width, channels). |