Ejemplo n.º 1
0
    def _init_model(self):
        self.gan_net = self.model_manager.gan_model()
        self.gan_net = RunnerHelper.load_net(self, self.gan_net)

        self.optimizer_G, self.scheduler_G = Trainer.init(
            self._get_parameters()[0], self.configer.get('solver'))
        self.optimizer_D, self.scheduler_D = Trainer.init(
            self._get_parameters()[1], self.configer.get('solver'))

        self.train_loader = self.seg_data_loader.get_trainloader()
        self.val_loader = self.seg_data_loader.get_valloader()
Ejemplo n.º 2
0
    def _init_model(self):
        self.det_net = self.det_model_manager.object_detector()
        self.det_net = RunnerHelper.load_net(self, self.det_net)

        self.optimizer, self.scheduler = Trainer.init(self._get_parameters(), self.configer.get('solver'))

        self.train_loader = self.det_data_loader.get_trainloader()
        self.val_loader = self.det_data_loader.get_valloader()
Ejemplo n.º 3
0
 def _init_model(self):
     # torch.multiprocessing.set_sharing_strategy('file_system')
     self.det_net = self.det_model_manager.object_detector()
     self.det_net = RunnerHelper.load_net(self, self.det_net)
     self.optimizer, self.scheduler = Trainer.init(self._get_parameters(), self.configer.get('solver'))
     self.train_loader = self.det_data_loader.get_trainloader()
     self.val_loader = self.det_data_loader.get_valloader()
     self.det_loss = self.det_model_manager.get_det_loss()
Ejemplo n.º 4
0
    def _init_model(self):
        self.pose_net = self.pose_model_manager.get_single_pose_model()
        self.pose_net = RunnerHelper.load_net(self, self.pose_net)

        self.optimizer, self.scheduler = Trainer.init(
            self._get_parameters(), self.configer.get('solver'))

        self.train_loader = self.pose_data_loader.get_trainloader()
        self.val_loader = self.pose_data_loader.get_valloader()

        self.cpm_loss = self.pose_model_manager.get_pose_loss()
Ejemplo n.º 5
0
    def _init_model(self):
        self.pose_net = self.pose_model_manager.get_multi_pose_model()
        self.pose_net = RunnerHelper.load_net(self, self.pose_net)

        self.optimizer, self.scheduler = Trainer.init(self._get_parameters(), self.configer.get('solver'))

        self.train_loader = self.pose_data_loader.get_trainloader()
        self.val_loader = self.pose_data_loader.get_valloader()

        self.weights = self.configer.get('network', 'loss_weights')
        self.mse_loss = self.pose_model_manager.get_pose_loss()
Ejemplo n.º 6
0
    def _init_model(self):
        self.seg_net = self.seg_model_manager.get_seg_model()
        #print('5555')
        self.seg_net = RunnerHelper.load_net(self, self.seg_net)
        #print('6666')
        self.optimizer, self.scheduler = Trainer.init(
            self._get_parameters(), self.configer.get('solver'))

        self.train_loader = self.seg_data_loader.get_trainloader()
        self.val_loader = self.seg_data_loader.get_valloader()

        self.loss = self.seg_model_manager.get_seg_loss()
    def __init__(self, configer):
        self.configer = configer
        self.runner_state = dict()

        self.batch_time = AverageMeter()
        self.data_time = AverageMeter()
        self.train_losses = DictAverageMeter()
        self.val_losses = DictAverageMeter()
        self.cls_model_manager = ModelManager(configer)
        self.cls_data_loader = DataLoader(configer)
        self.running_score = ClsRunningScore(configer)

        self.cls_net = self.cls_model_manager.get_cls_model()
        self.solver_dict = self.configer.get('solver')
        self.cls_net = RunnerHelper.load_net(self, self.cls_net)
        self.optimizer, self.scheduler = Trainer.init(self._get_parameters(), self.solver_dict)
        self.train_loader = self.cls_data_loader.get_trainloader()
        self.val_loader = self.cls_data_loader.get_valloader()
        self.loss = self.cls_model_manager.get_cls_loss()