(self)
return batch_x, batch_y
For python 2.x.
        # Returns
            The next batch.
For python 2.x.
        # Returns
            The next batch.
For python 2 . x . # Returns The next batch .
def next(self):
        """For python 2.x.
        # Returns
            The next batch.
        """
        # Keeps under lock only the mechanism which advances
        # the indexing of each batch.
        with self.lock:
            index_array, current_index, current_batch_size =\
                next(self.index_generator)
        # The transformation of images is not under thread lock
        # so it can be done in parallel
        batch_x = np.zeros(tuple([current_batch_size] +
                                 [self.smiles_data_generator.pad, self.smiles_data_generator._charlen]),
                           dtype=self.dtype)
        for i, j in enumerate(index_array):
            smiles = self.x[j:j + 1]
            x = self.smiles_data_generator.transform(smiles)
            batch_x[i] = x

        if self.y is None:
            return batch_x
        batch_y = self.y[index_array]
        return batch_x, batch_y
def next ( self ) : # Keeps under lock only the mechanism which advances # the indexing of each batch. with self . lock : index_array , current_index , current_batch_size = next ( self . index_generator ) # The transformation of images is not under thread lock # so it can be done in parallel batch_x = np . zeros ( tuple ( [ current_batch_size ] + [ self . smiles_data_generator . pad , self . smiles_data_generator . _charlen ] ) , dtype = self . dtype ) for i , j in enumerate ( index_array ) : smiles = self . x [ j : j + 1 ] x = self . smiles_data_generator . transform ( smiles ) batch_x [ i ] = x if self . y is None : return batch_x batch_y = self . y [ index_array ] return batch_x , batch_y