コード例 #1
0
 def load(self):
     '''Load net models for algorithm given the required property self.net_names'''
     if not hasattr(self, 'net_names'):
         logger.info(
             'No net declared in self.net_names in init_nets(); no models to load.'
         )
     else:
         net_util.load_algorithm(self)
コード例 #2
0
 def load(self):
     '''Load net models for algorithm given the required property self.net_names'''
     if not hasattr(self, 'net_names'):
         logger.info('No net declared in self.net_names in init_nets(); no models to load.')
     else:
         net_util.load_algorithm(self)
     # set decayable variables to final values
     for k, v in vars(self).items():
         if k.endswith('_scheduler'):
             var_name = k.replace('_scheduler', '')
             setattr(self.body, var_name, v.end_val)
コード例 #3
0
ファイル: base.py プロジェクト: ronald-xie/SLM-Lab
 def load(self):
     '''Load net models for algorithm given the required property self.net_names'''
     if not hasattr(self, 'net_names'):
         logger.info('No net declared in self.net_names in init_nets(); no models to load.')
     else:
         net_util.load_algorithm(self)