def create_hyperupdater( self, updaterlist ): if self.param.hyperupdater == 'none': return [] elif self.param.hyperupdater == 'gibbs-joint': return [ nnupdater.HyperUpdater( self.param, updaterlist ) ] elif self.param.hyperupdater == 'gibbs-sep': return [ nnupdater.HyperUpdater( self.param, [u] ) for u in updaterlist ] else: pass
def create_hyperupdater(self, updaterlist): if self.param.hyperupdater == 'none': return [] elif self.param.hyperupdater == 'gibbs-joint': return [nnupdater.HyperUpdater(self.param, updaterlist)] elif self.param.hyperupdater == 'gibbs-sep': return [ nnupdater.HyperUpdater(self.param, [u]) for u in updaterlist ] else: raise RuntimeError('NNConfig', 'unknown hyperupdater')
def create_hyperupdater(self, updaterlist): if self.param.hyperupdater == 'none': return [] elif self.param.hyperupdater == 'gibbs-joint': return [nnupdater.HyperUpdater(self.param, updaterlist)] elif self.param.hyperupdater == 'gibbs-sep': # Default case: create HyperUpdater for _each_ weight. It's what I # have in my blog post; each weight gets its own sampled h-params. return [ nnupdater.HyperUpdater(self.param, [u]) for u in updaterlist ] else: raise Exception('NNConfig', 'unknown hyperupdater')
def create_hyperupdater(self, updaterlist): return [nnupdater.HyperUpdater(self.param, [u]) for u in updaterlist]