File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,20 @@ def create_conv_layer(
1212 bias : bool = True ,
1313 groups : int = 1 ,
1414) -> nn .Module :
15- """Create a convolutional layer based on the number of dimensions."""
15+ """
16+ Create a convolutional layer based on the number of dimensions.
17+
18+ :param n_dims: The number of dimensions (1 or 2).
19+ :param in_channels: Number of input channels.
20+ :param out_channels: Number of output channels.
21+ :param kernel_size: Size of the convolutional kernel.
22+ :param stride: Stride of the convolution. Default is 1.
23+ :param padding: Padding added to both sides of the input. Default is 0.
24+ :param bias: If True, adds a learnable bias to the output. Default is True.
25+ :param groups: Number of blocked connections from input channels to output channels. Default is 1.
26+
27+ :return: A convolutional layer (nn.Conv1d or nn.Conv2d).
28+ """
1629 if n_dims == 1 :
1730 return nn .Conv1d (
1831 in_channels = in_channels ,
You can’t perform that action at this time.
0 commit comments