Decay learning rates of the generator and discriminator.
(self, g_lr, d_lr)
| 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.""" |
no outgoing calls
no test coverage detected