MCPcopy Create free account
hub / github.com/OpenGVLab/HumanBench / step

Method step

PATH/core/optimizers/adam_clip.py:58–63  ·  view source on GitHub ↗
(self, closure=None)

Source from the content-addressed store, hash-verified

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
65class AdamWWithClipDev(AdamW):
66 def __init__(self, params, lr=1e-3, betas=(0.9, 0.999), eps=1e-8,

Callers

nothing calls this directly

Calls 2

clip_grad_norm_Function · 0.85
stepMethod · 0.45

Tested by

no test coverage detected