tools/utilities/pythonlibs/audio/training/train_classifier.py
def forward(self, input):
        """ Perform the forward processing of the given input and return the prediction """
        # input is shape: [seq,batch,feature]
        lstm_out, self.hidden1 = self.lstm1(input, self.hidden1)
        lstm_out, self.hidden2 = self.lstm2(lstm_out, self.hidden2)
        keyword_space = self.hidden2keyword(lstm_out) 
        result = F.log_softmax(keyword_space, dim=2)
        # return the mean across the sequence length to produce the 
        # best prediction of which word exists in that sequence.
        # we can do that because we know each window_size sequence in  
        # the training dataset contains at most one word.
        result = result.mean(dim=0) 
        return result
 Perform the forward processing of the given input and return the prediction 
Perform the forward processing of the given input and return the prediction
Perform the forward processing of the given input and return the prediction
def forward(self, input):
        lstm_out, self.hidden1 = self.lstm1(input, self.hidden1)
        lstm_out, self.hidden2 = self.lstm2(lstm_out, self.hidden2)
        keyword_space = self.hidden2keyword(lstm_out) 
        result = F.log_softmax(keyword_space, dim=2)
        result = result.mean(dim=0) 
        return result
def forward ( self , input ) : lstm_out , self . hidden1 = self . lstm1 ( input , self . hidden1 ) lstm_out , self . hidden2 = self . lstm2 ( lstm_out , self . hidden2 ) keyword_space = self . hidden2keyword ( lstm_out ) result = F . log_softmax ( keyword_space , dim = 2 ) result = result . mean ( dim = 0 ) return result
Perform the forward processing of the given input and return the prediction
Perform the forward processing of the given input and return the prediction
""" Perform the forward processing of the given input and return the prediction """ # input is shape: [seq,batch,feature] # return the mean across the sequence length to produce the  # best prediction of which word exists in that sequence. # we can do that because we know each window_size sequence in   # the training dataset contains at most one word.
self
input