MCPcopy Create free account
hub / github.com/CGuangyan-BIT/PointGPT / build_lambda_sche

Function build_lambda_sche

utils/misc.py:26–32  ·  view source on GitHub ↗
(opti, config)

Source from the content-addressed store, hash-verified

24 np.random.seed(np.random.get_state()[1][0] + worker_id)
25
26def build_lambda_sche(opti, config):
27 if config.get('decay_step') is not None:
28 lr_lbmd = lambda e: max(config.lr_decay ** (e / config.decay_step), config.lowest_decay)
29 scheduler = torch.optim.lr_scheduler.LambdaLR(opti, lr_lbmd)
30 else:
31 raise NotImplementedError()
32 return scheduler
33
34def build_lambda_bnsche(model, config):
35 if config.get('decay_step') is not None:

Callers 1

build_opti_scheFunction · 0.50

Calls 1

getMethod · 0.45

Tested by

no test coverage detected