MCPcopy
hub / github.com/yunjey/stargan / update_lr

Method update_lr

solver.py:111–116  ·  view source on GitHub ↗

Decay learning rates of the generator and discriminator.

(self, g_lr, d_lr)

Source from the content-addressed store, hash-verified

109 self.logger = Logger(self.log_dir)
110
111 def update_lr(self, g_lr, d_lr):
112 """Decay learning rates of the generator and discriminator."""
113 for param_group in self.g_optimizer.param_groups:
114 param_group['lr'] = g_lr
115 for param_group in self.d_optimizer.param_groups:
116 param_group['lr'] = d_lr
117
118 def reset_grad(self):
119 """Reset the gradient buffers."""

Callers 2

trainMethod · 0.95
train_multiMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected