(self,name)
| 439 | self.load_network(load_path_G, self.netG_Pre, self.opt['path']['strict_load']) |
| 440 | |
| 441 | def save_M(self,name): |
| 442 | with torch.no_grad(): |
| 443 | for i, w in enumerate(self.netG.parameters()): |
| 444 | self.Star_vals[i].copy_(w) |
| 445 | torch.save(self.Importance, os.path.join(self.opt['path']['models'], name+'Importance.pth')) |
| 446 | torch.save(self.Star_vals, os.path.join(self.opt['path']['models'], name+'Star.pth')) |
| 447 | |
| 448 | def save(self, iter_label): |
| 449 | self.save_network(self.netG, 'G', iter_label) |