(self, in_channels: int, out_channels: int)
Instantiating ConvBlock class

        Args:
            in_channels (int): in_channels of ConvBlock
            out_channels (int): out_channels of ConvBlock
Instantiating ConvBlock class
Instantiating ConvBlock class
def __init__(self, in_channels: int, out_channels: int) -> None:
        """Instantiating ConvBlock class

        Args:
            in_channels (int): in_channels of ConvBlock
            out_channels (int): out_channels of ConvBlock
        """
        super(ConvBlock, self).__init__()
        self._projection = (in_channels != out_channels)
        self._ops = nn.Sequential(nn.Conv1d(in_channels, out_channels, 3, 1, 1),
                                  nn.BatchNorm1d(out_channels),
                                  nn.ReLU(),
                                  nn.Conv1d(out_channels, out_channels, 3, 1, 1),
                                  nn.BatchNorm1d(out_channels),
                                  nn.ReLU())

        if self._projection:
            self._shortcut = nn.Sequential(nn.Conv1d(in_channels, out_channels, 1, 1),
                                           nn.BatchNorm1d(out_channels))
        self._bn = nn.BatchNorm1d(out_channels)
def __init__ ( self , in_channels : int , out_channels : int ) -> None : super ( ConvBlock , self ) . __init__ ( ) self . _projection = ( in_channels != out_channels ) self . _ops = nn . Sequential ( nn . Conv1d ( in_channels , out_channels , 3 , 1 , 1 ) , nn . BatchNorm1d ( out_channels ) , nn . ReLU ( ) , nn . Conv1d ( out_channels , out_channels , 3 , 1 , 1 ) , nn . BatchNorm1d ( out_channels ) , nn . ReLU ( ) ) if self . _projection : self . _shortcut = nn . Sequential ( nn . Conv1d ( in_channels , out_channels , 1 , 1 ) , nn . BatchNorm1d ( out_channels ) ) self . _bn = nn . BatchNorm1d ( out_channels )