(self, closure=None)
| 27 | self.norm_type = norm_type |
| 28 | |
| 29 | def step(self, closure=None): |
| 30 | |
| 31 | if self.max_norm is not None: |
| 32 | for group in self.param_groups: |
| 33 | clip_grad_norm_(group['params'], self.max_norm, self.norm_type) |
| 34 | super(AdamWWithClip, self).step(closure) |
| 35 | |
| 36 | |
| 37 | # class AdamWWithClipDev(AdamW): |
nothing calls this directly
no test coverage detected