deepy/trainers/base.py
def run(self, train_set, valid_set=None, test_set=None, train_size=None, epoch_controllers=None):
        """
        Run until the end.
        :param epoch_controllers: deprecated
        """
        epoch_controllers = epoch_controllers if epoch_controllers else []
        epoch_controllers += self._epoch_controllers
        if isinstance(train_set, Dataset):
            dataset = train_set
            train_set = dataset.train_set()
            valid_set = dataset.valid_set()
            test_set = dataset.test_set()
            train_size = dataset.train_size()
        self._current_train_set = train_set
        self._current_valid_set = valid_set
        self._current_test_set = test_set
        if epoch_controllers:
            for controller in epoch_controllers:
                controller.bind(self)
        timer = Timer()
        for _ in self.train(train_set, valid_set=valid_set, test_set=test_set, train_size=train_size):
            if epoch_controllers:
                for controller in epoch_controllers:
                    controller.invoke()
            if self._ended:
                break
        if self._report_time:
            timer.report()
def run(self, train_set, valid_set=None, test_set=None, train_size=None, epoch_controllers=None):
        """
        Run until the end.
        :param epoch_controllers: deprecated
        """
        epoch_controllers = epoch_controllers if epoch_controllers else []
        epoch_controllers += self._epoch_controllers
        if isinstance(train_set, Dataset):
            dataset = train_set
            train_set = dataset.train_set()
            valid_set = dataset.valid_set()
            test_set = dataset.test_set()
            train_size = dataset.train_size()
        self._current_train_set = train_set
        self._current_valid_set = valid_set
        self._current_test_set = test_set
        if epoch_controllers:
            for controller in epoch_controllers:
                controller.bind(self)
        timer = Timer()
        for _ in self.train(train_set, valid_set=valid_set, test_set=test_set, train_size=train_size):
            if epoch_controllers:
                for controller in epoch_controllers:
                    controller.invoke()
            if self._ended:
                break
        if self._report_time:
            timer.report()
def run ( self , train_set , valid_set = None , test_set = None , train_size = None , epoch_controllers = None ) : epoch_controllers = epoch_controllers if epoch_controllers else [ ] epoch_controllers += self . _epoch_controllers if isinstance ( train_set , Dataset ) : dataset = train_set train_set = dataset . train_set ( ) valid_set = dataset . valid_set ( ) test_set = dataset . test_set ( ) train_size = dataset . train_size ( ) self . _current_train_set = train_set self . _current_valid_set = valid_set self . _current_test_set = test_set if epoch_controllers : for controller in epoch_controllers : controller . bind ( self ) timer = Timer ( ) for _ in self . train ( train_set , valid_set = valid_set , test_set = test_set , train_size = train_size ) : if epoch_controllers : for controller in epoch_controllers : controller . invoke ( ) if self . _ended : break if self . _report_time : timer . report ( )
Run until the end.
        :param epoch_controllers: deprecated
Run until the end . : param epoch_controllers : deprecated