BSConv
BSConv1d
Bases: Module
BSConv1d
implements the BSConv
concept which is based on the paper BSConv:
Binarized Separated Convolutional Neural Networks.
BSConv
is an amalgamation of depthwise separable convolution and pointwise convolution.
Depthwise separable convolution utilizes far fewer parameters by separating the spatial
(depthwise) and channel-wise (pointwise) operations. Meanwhile, pointwise convolution
helps in transforming the channel characteristics without considering the channel's context.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
channels_in |
int
|
Number of input channels |
required |
channels_out |
int
|
Number of output channels produced by the convolution |
required |
kernel_size |
int
|
Size of the kernel used in depthwise convolution |
required |
padding |
int
|
Zeropadding added around the input tensor along the height and width directions |
required |
Attributes:
Name | Type | Description |
---|---|---|
pointwise |
PointwiseConv1d
|
Pointwise convolution module |
depthwise |
DepthWiseConv1d
|
Depthwise separable convolution module |