def main_loop(self, **kwargs):
        """
        .. todo::

            WRITEME

        Parameters
        ----------
        **kwargs : dict, optional
            WRITEME
        """
        if self.batch_size is None:
            if self.topo:
                data = self.dataset.get_topological_view()
            else:
                data = self.dataset.get_design_matrix()
            output = self.encoder.perform(data)
        else:
            myiterator = self.dataset.iterator(mode='sequential',
                                               batch_size=self.batch_size,
                                               topo=self.topo)
            chunks = []
            for data in myiterator:
                chunks.append(self.encoder.perform(data))
            output = np.concatenate(chunks)
        np.save(self.path, output)
dataset/ETHPy150Open lisa-lab/pylearn2/pylearn2/scripts/train.py/FeatureDump.main_loop/original