def gen_batches(self, data, batch_size):
    ' Divide input data into batches \n        data INPUT parameter: input data( like a data frame)\n        batch_size INPUT parameter: desired size of each batch\n        :RETURN data divided in batches \n        '
    data = np.array(data)
    for i in range(0, data.shape[0], batch_size):
        (yield data[i:(i + batch_size)])
Divide input data into batches 
data INPUT parameter: input data( like a data frame)
batch_size INPUT parameter: desired size of each batch
:RETURN data divided in batches
def gen_batches(self, data, batch_size):
    ' Divide input data into batches \n        data INPUT parameter: input data( like a data frame)\n        batch_size INPUT parameter: desired size of each batch\n        :RETURN data divided in batches \n        '
    data = np.array(data)
    for i in range(0, data.shape[0], batch_size):
        (yield data[i:(i + batch_size)])