(self, closure=None)
| 56 | self.norm_type = norm_type |
| 57 | |
| 58 | def step(self, closure=None): |
| 59 | if self.clip_norm is not None: |
| 60 | all_params = itertools.chain(*[x["params"] for x in self.param_groups if x['params'][0].backbone_specific ]) |
| 61 | clip_grad_norm_(all_params, self.clip_norm, self.norm_type) |
| 62 | |
| 63 | super(AdamWWithBackboneClipDev, self).step(closure) |
| 64 | |
| 65 | class AdamWWithClipDev(AdamW): |
| 66 | def __init__(self, params, lr=1e-3, betas=(0.9, 0.999), eps=1e-8, |
nothing calls this directly
no test coverage detected