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

Method __init__

PATH/core/optimizers/adam_clip.py:8–12  ·  view source on GitHub ↗
(self, params, lr=1e-3, betas=(0.9, 0.999), eps=1e-8,
                 weight_decay=0, amsgrad=False, max_norm=None, norm_type=2)

Source from the content-addressed store, hash-verified

6class AdamWithClip(Adam):
7
8 def __init__(self, params, lr=1e-3, betas=(0.9, 0.999), eps=1e-8,
9 weight_decay=0, amsgrad=False, max_norm=None, norm_type=2):
10 super(AdamWithClip, self).__init__(params, lr, betas, eps, weight_decay, amsgrad)
11 self.max_norm = max_norm
12 self.norm_type = norm_type
13
14 def step(self, closure=None):
15 if self.max_norm is not None:

Callers 3

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected