How to use the continuum.data_utils.load_data function in continuum

To help you get started, we’ve selected a few continuum examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github TLESORT / Continual_Learning_Data_Former / continuum / continuumbuilder.py View on Github external
def formating_data(self):

        self.prepare_formatting()

        # variable to save the sequence
        self.continuum = []

        x_, y_ = load_data(self.dataset, self.i, self.train)

        for ind_task in range(self.tasks_number):

            c1, c2, x_t, y_t = self.create_task(ind_task, x_, y_)
            self.continuum.append([(c1, c2), x_t, y_t])

        if self.verbose and not self.path_only:
            print(self.continuum[0][1].shape)
            print(self.continuum[0][1].mean())
            print(self.continuum[0][1].std())

        torch.save(self.continuum, self.out_file)