def create_updater( self, w, g_w, sg_w ): if self.param.updater == 'sgd': return nnupdater.SGDUpdater( w, g_w, self.param ) elif self.param.updater == 'sghmc' or self.param.updater == 'sgld': if self.param.updater == 'sgld': self.param.mdecay = 1.0 return nnupdater.SGHMCUpdater( w, g_w, self.param ) elif self.param.updater == 'nag': return nnupdater.NAGUpdater( w, g_w, self.param ) else: pass
def create_updater(self, w, g_w, sg_w): if self.param.updater == 'sgd': return nnupdater.SGDUpdater(w, g_w, self.param) elif self.param.updater == 'sghmc' or self.param.updater == 'sgld': if self.param.updater == 'sgld': self.param.mdecay = 1.0 return nnupdater.SGHMCUpdater(w, g_w, self.param) elif self.param.updater == 'nag': return nnupdater.NAGUpdater(w, g_w, self.param) else: raise RuntimeError('NNConfig', 'unknown updater')
def create_updater(self, w, g_w, sg_w): return nnupdater.SGHMCUpdater(w, g_w, self.param)