MCPcopy Create free account
hub / github.com/KeepTryingTo/Pytorch-GAN / copy_weights_to

Method copy_weights_to

StyleGAN/utils.py:131–134  ·  view source on GitHub ↗
(self, model)

Source from the content-addressed store, hash-verified

129 self.save_ema_weights()
130
131 def copy_weights_to(self, model):
132 for name, param in model.named_parameters():
133 if param.requires_grad:
134 param.data = self.registered[name]
135
136 def save_ema_weights(self):
137 torch.save(self.registered, self.save_filename)

Callers 1

train_fnFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected