tools/utilities/pythonlibs/audio/training/train_classifier.py
def to_long_vector(self):
        """ convert the expected labels to a list of integer indexes into the array of keywords """
        result = np.zeros((self.num_rows, self.num_keywords), dtype=np.float32)
        indexer = [ (0 if x == "<null>" else self.keywords.index(x)) for x in self.label_names ]
        return np.array(indexer, dtype=np.longlong)
 convert the expected labels to a list of integer indexes into the array of keywords 
convert the expected labels to a list of integer indexes into the array of keywords
convert the expected labels to a list of integer indexes into the array of keywords
def to_long_vector(self):
        result = np.zeros((self.num_rows, self.num_keywords), dtype=np.float32)
        indexer = [ (0 if x == "<null>" else self.keywords.index(x)) for x in self.label_names ]
        return np.array(indexer, dtype=np.longlong)
def to_long_vector ( self ) : result = np . zeros ( ( self . num_rows , self . num_keywords ) , dtype = np . float32 ) indexer = [ ( 0 if x == "<null>" else self . keywords . index ( x ) ) for x in self . label_names ] return np . array ( indexer , dtype = np . longlong )
convert the expected labels to a list of integer indexes into the array of keywords
convert the expected labels to a list of integer indexes into the array of keywords
""" convert the expected labels to a list of integer indexes into the array of keywords """
self