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 |
Source code in models/tts/delightful_tts/conv_blocks/bsconv.py
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
|