'Generator that can be used to iterate over this dataset'

def __iter__(self):

    self.batch_index = 0
    while (self.batch_index < self.nbatches):
        self.X_np.fill(0)
        idx = range((self.batch_index * self.be.bsz), ((self.batch_index + 1) * self.be.bsz))
        for (i, ix) in enumerate(idx):
            s_len = self.sent_len[ix]
            self.X_np[(- s_len):, i] = (self.X[ix][(- s_len):] + self.index_from)
        self.dev_X.set(self.X_np)
        self.batch_index += 1
        (yield (self.dev_X, None))
