def apply_hess(self, path='', hessian='Newton'): """ Evaluates action of Hessian on a given model vector. """ unix.cd(self.getpath) self.imprt(path, 'model') self.forward() unix.mv(self.wildcard, 'traces/lcg') preprocess.prepare_apply_hess(self.getpath) self.adjoint() self.export_kernels(path)
def apply_hess(self, path=''): """ Computes action of Hessian on a given model vector. A gradient evaluation must have already been carried out beforehand. """ unix.cd(self.getpath) unix.mkdir('traces/lcg') self.import_model(path) self.forward('traces/lcg') preprocess.prepare_apply_hess(self.getpath) self.adjoint() self.export_kernels(path)
def apply_hess(self, path=''): """ Computes action of Hessian on a given model vector. """ # a gradient evaluation must have already been carried out unix.cd(self.getpath) unix.mkdir('traces/lcg') self.import_model(path) self.forward() unix.mv(self.data_wildcard, 'traces/lcg') preprocess.prepare_apply_hess(self.getpath) self.adjoint() self.export_kernels(path)