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

Method step

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

Source from the content-addressed store, hash-verified

12 self.norm_type = norm_type
13
14 def step(self, closure=None):
15 if self.max_norm is not None:
16 for group in self.param_groups:
17 clip_grad_norm_(group['params'], self.max_norm, self.norm_type)
18 super(AdamWithClip, self).step(closure)
19
20
21class AdamWWithClip(AdamW):

Callers 3

stepMethod · 0.45
stepMethod · 0.45
stepMethod · 0.45

Calls 1

clip_grad_norm_Function · 0.85

Tested by

no test coverage detected