MCPcopy Create free account
hub / github.com/IntelligentSystemsLab/ST-EVCDP / zero_init_global_gradient

Function zero_init_global_gradient

functions.py:215–220  ·  view source on GitHub ↗
(model)

Source from the content-addressed store, hash-verified

213
214
215def zero_init_global_gradient(model):
216 grads = dict()
217 for name, param in model.named_parameters():
218 param.requires_grad_(True)
219 grads[name] = 0
220 return grads
221
222
223def data_mix(ori_data, pse_data, mix_ratio):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected