def setModule(self, module): RLLearner.setModule(self, module) self.gd.init(module.params)
def setModule(self, module): """ sets the module for the learner and copies the initial parameters. """ RLLearner.setModule(self, module) self.original = self.module.params.copy() if self.ds: self.ds.addField('deltas', self.module.paramdim)
def setData(self, ds): """ sets the dataset for the learner. """ RLLearner.setData(self, ds) # add the field for parameter deltas to the dataset (unlinked) if self.module: self.ds.addField('deltas', self.module.paramdim)