Ejemplo n.º 1
0
    def __init__(self, net_param, action_param, is_training):
        SegmentationApplication.__init__(self, net_param, action_param,
                                         is_training)
        tf.logging.info('starting decay learning segmentation application')
        self.learning_rate = None
        self.momentum = None
        max_lr = action_param.lr
        self.max = action_param.max_iter
        pct = 1 / max_lr if max_lr > 3 else 0.3
        a = int(self.max * pct)
        b = self.max - a
        phases = (a, b)

        div_factor = 20
        final_div = div_factor * 1e3
        low_lr = max_lr / div_factor
        min_lr = max_lr / final_div
        lr_cfg = ((low_lr, max_lr), (max_lr, min_lr))
        moms = (action_param.mom, action_param.mom_end)
        mom_cfg = (moms, (moms[1], moms[0]))

        self.lr_prop = steps({'steps_cfg': lr_cfg, 'phases': phases})
        self.mom_prop = steps({'steps_cfg': mom_cfg, 'phases': phases})
        self.current_lr = self.lr_prop[0].start
        self.mom = self.mom_prop[0].start
        self.res = {}
Ejemplo n.º 2
0
 def __init__(self, net_param, action_param, is_training):
     SegmentationApplication.__init__(self, net_param, action_param,
                                      is_training)
     tf.logging.info('starting decay learning segmentation application')
     self.learning_rate = None
     self.current_lr = action_param.lr
     if self.action_param.validation_every_n > 0:
         raise NotImplementedError("validation process is not implemented "
                                   "in this demo.")
Ejemplo n.º 3
0
 def __init__(self, net_param, action_param, is_training):
     SegmentationApplication.__init__(
         self, net_param, action_param, is_training)
     tf.logging.info('starting decay learning segmentation application')
     self.learning_rate = None
     self.current_lr = action_param.lr
     if self.action_param.validation_every_n > 0:
         raise NotImplementedError("validation process is not implemented "
                                   "in this demo.")
Ejemplo n.º 4
0
 def __init__(self, net_param, action_param, is_training):
     SegmentationApplication.__init__(self, net_param, action_param,
                                      is_training)
     tf.logging.info('starting decay learning segmentation application')
     self.learning_rate = None
     self.current_lr = action_param.lr
     self.init_lr = action_param.lr
     self.prec_loss = 10.0
     self.curent_loss = None
     self.count = 0
     self.tx = 0.2
     self.cpt = 0
     self.theta = float(action_param.max_iter)
     self.beta = float(self.theta * 3)
     self.avg = 0
    def __init__(self, net_param, action_param, is_training):
        SegmentationApplication.__init__(self, net_param, action_param,
                                         is_training)
        tf.logging.info('starting decay learning segmentation application')
        self.learning_rate = None
        max_lr = action_param.lr
        self.max = action_param.max_iter
        pct = 1 / max_lr if max_lr > 3 else 0.3
        a = int(self.max * pct)
        b = self.max - a
        phases = (a, b)

        div_factor = 20
        final_div = div_factor * 1e3
        low_lr = max_lr / div_factor
        min_lr = max_lr / final_div
        step_cfg = ((low_lr, max_lr), (max_lr, min_lr))

        self.lr_prop = steps({'steps_cfg': step_cfg, 'phases': phases})
        self.current_lr = self.lr_prop[0].start
        self.res = {}
        print("\n\nThe maximum learning rate should be greater than 1e-3\n\n")
 def __init__(self, net_param, action_param, is_training):
     SegmentationApplication.__init__(self, net_param, action_param,
                                      is_training)
     tf.logging.info('starting segmentation application')
Ejemplo n.º 7
0
 def __init__(self, net_param, action_param, is_training):
     SegmentationApplication.__init__(
         self, net_param, action_param, is_training)
     tf.logging.info('starting decay learning segmentation application')
     self.learning_rate = None