示例#1
0
 def init_optim(self, params, optim_states=None, saved_optim_type=None):
     """
     Initialize the optimizer.
     """
     self.optimizer = get_bert_optimizer([self.model],
                                         self.opt['type_optimization'],
                                         self.opt['learningrate'])
 def init_optim(self, params, optim_states=None, saved_optim_type=None):
     self.optimizer = get_bert_optimizer([self.model],
                                         self.opt['type_optimization'],
                                         self.opt['learningrate'],
                                         fp16=self.opt.get('fp16'))