(self, data, batch_size, gpu, evaluation=False)
input:
            data - list of lists
            batch_size - int
input:
            data - list of lists
            batch_size - int
input : data - list of lists batch_size - int
def __init__(self, data, batch_size, gpu, evaluation=False):
        '''
        input:
            data - list of lists
            batch_size - int
        '''
        self.batch_size = batch_size
        self.eval = evaluation
        self.gpu = gpu

        # shuffle
        if not evaluation:
            indices = list(range(len(data)))
            random.shuffle(indices)
            data = [data[i] for i in indices]
        # chunk into batches
        data = [data[i:i + batch_size] for i in range(0, len(data), batch_size)]
        self.data = data
def __init__ ( self , data , batch_size , gpu , evaluation = False ) : self . batch_size = batch_size self . eval = evaluation self . gpu = gpu # shuffle if not evaluation : indices = list ( range ( len ( data ) ) ) random . shuffle ( indices ) data = [ data [ i ] for i in indices ] # chunk into batches data = [ data [ i : i + batch_size ] for i in range ( 0 , len ( data ) , batch_size ) ] self . data = data