espnet2.enh.layers.dc_crn.DenselyConnectedBlock
Less than 1 minute
espnet2.enh.layers.dc_crn.DenselyConnectedBlock
class espnet2.enh.layers.dc_crn.DenselyConnectedBlock(in_channels, out_channels, hid_channels=8, kernel_size=(1, 3), padding=(0, 1), last_kernel_size=(1, 4), last_stride=(1, 2), last_padding=(0, 1), last_output_padding=(0, 0), layers=5, transposed=False)
Bases: Module
Densely-Connected Convolutional Block.
- Parameters:
- in_channels (int) – number of input channels
- out_channels (int) – number of output channels
- hid_channels (int) – number of output channels in intermediate Conv layers
- kernel_size (tuple) – kernel size for all but the last Conv layers
- padding (tuple) – padding for all but the last Conv layers
- last_kernel_size (tuple) – kernel size for the last GluConv layer
- last_stride (tuple) – stride for the last GluConv layer
- last_padding (tuple) – padding for the last GluConv layer
- last_output_padding (tuple) – output padding for the last GluConvTranspose2d (only used when transposed=True)
- layers (int) – total number of Conv layers
- transposed (bool) – True to use GluConvTranspose2d in the last layer False to use GluConv2d in the last layer
forward(input)
DenselyConnectedBlock forward.
- Parameters:input (torch.Tensor) – (B, C, T_in, F_in)
- Returns: (B, C, T_out, F_out)
- Return type: out (torch.Tensor)