(self, input, return_layers=False)
input: (samples_num, time_steps, freq_bins)
input: (samples_num, time_steps, freq_bins)
input : ( samples_num time_steps freq_bins )
def forward(self, input, return_layers=False):
        """input: (samples_num, time_steps, freq_bins)
        """

        drop_rate = self.drop_rate

        # (samples_num, freq_bins, time_steps)
        x = input.transpose(1, 2)

        # Add an extra dimension for using Conv2d
        # (samples_num, freq_bins, time_steps, 1)
        x = x[:, :, :, None].contiguous()

        a0 = self.bn0(x)
        a1 = F.dropout(F.relu(self.bn1(self.conv1(a0))),
                       p=drop_rate,
                       training=self.training)

        a2 = F.dropout(F.relu(self.bn2(self.conv2(a1))),
                       p=drop_rate,
                       training=self.training)

        emb = F.dropout(F.relu(self.bn3(self.conv3(a2))),
                        p=drop_rate,
                        training=self.training)

        if return_layers is False:
            # (samples_num, hidden_units, time_steps, 1)
            return emb

        else:
            return [a0, a1, a2, emb]
def forward ( self , input , return_layers = False ) : drop_rate = self . drop_rate # (samples_num, freq_bins, time_steps) x = input . transpose ( 1 , 2 ) # Add an extra dimension for using Conv2d # (samples_num, freq_bins, time_steps, 1) x = x [ : , : , : , None ] . contiguous ( ) a0 = self . bn0 ( x ) a1 = F . dropout ( F . relu ( self . bn1 ( self . conv1 ( a0 ) ) ) , p = drop_rate , training = self . training ) a2 = F . dropout ( F . relu ( self . bn2 ( self . conv2 ( a1 ) ) ) , p = drop_rate , training = self . training ) emb = F . dropout ( F . relu ( self . bn3 ( self . conv3 ( a2 ) ) ) , p = drop_rate , training = self . training ) if return_layers is False : # (samples_num, hidden_units, time_steps, 1) return emb else : return [ a0 , a1 , a2 , emb ]