Lileb/src/tasks/task_generator.py
def add_task(self, ambiant_dim, out_dim=None, n_samples_per_class=None):
        """
        Adds a new task to the current pool.
        This task will be a mutation of an existing task with probability `p_mutate` or a totally task
        with probability 1-`p_mutate`.
        :param in_dim:
        :param out_dim:
        :param n_samples_per_class:
        :return:
        """
        if self.task_pool and np.random.uniform() < self.p_mutate:
            task = self.choose_task()
            logger.info('Mutating existing task: {}'.format(task))
            new_task = self.mutate_task(task)
        else:
            logger.info('Creating new task from scratch')
            new_task = self.create_task(ambiant_dim, out_dim, n_samples_per_class)
        logger.info(new_task)
        self.task_pool.append(new_task)

        Adds a new task to the current pool.
        This task will be a mutation of an existing task with probability `p_mutate` or a totally task
        with probability 1-`p_mutate`.
        :param in_dim:
        :param out_dim:
        :param n_samples_per_class:
        :return:
        
Adds a new task to the current pool.
This task will be a mutation of an existing task with probability `p_mutate` or a totally task
with probability 1-`p_mutate`.
Adds a new task to the current pool . This task will be a mutation of an existing task with probability ` p_mutate ` or a totally task with probability 1 - ` p_mutate ` .
def add_task(self, ambiant_dim, out_dim=None, n_samples_per_class=None):
        if self.task_pool and np.random.uniform() < self.p_mutate:
            task = self.choose_task()
            logger.info('Mutating existing task: {}'.format(task))
            new_task = self.mutate_task(task)
        else:
            logger.info('Creating new task from scratch')
            new_task = self.create_task(ambiant_dim, out_dim, n_samples_per_class)
        logger.info(new_task)
        self.task_pool.append(new_task)
def add_task ( self , ambiant_dim , out_dim = None , n_samples_per_class = None ) : if self . task_pool and np . random . uniform ( ) < self . p_mutate : task = self . choose_task ( ) logger . info ( 'Mutating existing task: {}' . format ( task ) ) new_task = self . mutate_task ( task ) else : logger . info ( 'Creating new task from scratch' ) new_task = self . create_task ( ambiant_dim , out_dim , n_samples_per_class ) logger . info ( new_task ) self . task_pool . append ( new_task )
Adds a new task to the current pool.
Adds a new task to the current pool .
"""
        Adds a new task to the current pool.
        This task will be a mutation of an existing task with probability `p_mutate` or a totally task
        with probability 1-`p_mutate`.
        :param in_dim:
        :param out_dim:
        :param n_samples_per_class:
        :return:
        """
None
self
ambiant_dim
out_dim
None
n_samples_per_class
None
in_dim
None