Example #1
0
 def setup_arch_flags(cls):
     super().setup_arch_flags()
     flags.DEFINE_integer('max_epoch',
                          default=200,
                          help='number of max_epoch')
     flags.DEFINE_multi_integer('milestones',
                                default=[
                                    10, 20, 30, 40, 50, 60, 70, 80, 90, 100,
                                    110, 120, 140, 160
                                ],
                                help='miletones for lr_decay')
     flags.DEFINE_float('gamma', default=0.85, help='gamma for lr_decay')
     flags.DEFINE_string('device', default='cpu', help='cpu or cuda?')
     flags.DEFINE_integer('printfreq',
                          default=5,
                          help='how many output for an epoch')
     flags.DEFINE_integer('num_admm_innerloop',
                          default=2,
                          help='how many output for an epoch')
     flags.DEFINE_integer('num_workers',
                          default=1,
                          help='how many output for an epoch')
     flags.DEFINE_integer('batch_size',
                          default=1,
                          help='how many output for an epoch')
     flags.DEFINE_boolean('vis_during_training',
                          default=False,
                          help='matplotlib plot image during training')
     flags.DEFINE_boolean('group',
                          default=False,
                          help='group patient to perform 3D dice')
Example #2
0
 def setup_arch_flags(cls):
     """ Setup the arch_hparams """
     flags.DEFINE_float('weight_decay',
                        default=0,
                        help='decay of learning rate schedule')
     flags.DEFINE_float('lr', default=0.001, help='learning rate')
     flags.DEFINE_boolean('amsgrad', default=False, help='amsgrad')
     flags.DEFINE_integer('optim_inner_loop_num',
                          default=5,
                          help='optim_inner_loop_num')
     flags.DEFINE_string('arch', default='enet', help='arch_name')
     flags.DEFINE_integer('num_classes', default=2, help='num of classes')
     flags.DEFINE_string('method', default='admm_gc_size', help='arch_name')
     flags.DEFINE_boolean('ignore_negative',
                          default=False,
                          help='ignore negative examples in the training')
Example #3
0
 def setup_arch_flags(cls):
     super().setup_arch_flags()
     flags.DEFINE_boolean(
         'individual_size_constraint',
         default=True,
         help='Individual size constraint for each input image')
     flags.DEFINE_float('eps', default=0.001, help='Individual size eps')
     flags.DEFINE_integer(
         'global_upbound',
         default=2000,
         help='global upper bound if individual_size_constraint is False')
     flags.DEFINE_integer(
         'global_lowbound',
         default=20,
         help='global lower bound if individual_size_constraint is False')
     SizeConstraint.setup_arch_flag()
Example #4
0
 def setup_arch_flag(cls):
     flags.DEFINE_float('reg_eps',
                        default=0.25,
                        help='eps for inequality method')
     flags.DEFINE_float('reg_p_p', default=1, help='penalty for p_positive')
     flags.DEFINE_float('reg_p_n', default=1, help='penalty for p_negative')
     flags.DEFINE_float('reg_lamda',
                        default=1,
                        help='lamda for unary term and pairwise term')
     flags.DEFINE_float('reg_sigma',
                        default=0.02,
                        help='smoothness term for pairwise term')
     flags.DEFINE_integer('reg_dilation_level',
                          default=10,
                          help='dilation for the weak mask')
     flags.DEFINE_integer('reg_kernelsize',
                          default=5,
                          help='dilation for the weak mask')
Example #5
0
 def setup_arch_flags(cls):
     super().setup_arch_flags()
     flags.DEFINE_float(
         'lamda',
         default=0.01,
         help='balance between the unary and the neighor term')
     flags.DEFINE_float('sigma',
                        default=0.001,
                        help='Smooth the neigh term')
     flags.DEFINE_integer('kernelsize',
                          default=5,
                          help='kernelsize of the gc')
     flags.DEFINE_integer(
         'dilation_level',
         default=6,
         help='iterations to execute the dilation operation')
     flags.DEFINE_integer('stop_dilation_epoch',
                          default=70,
                          help='stop dilation operation at this epoch')
Example #6
0
 def setup_arch_flags(cls):
     super().setup_arch_flags()
     RegConstraint.setup_arch_flag()
     flags.DEFINE_integer('stop_dilation_epoch',
                          default=100,
                          help='stop dilation')