MCPcopy Index your code
hub / github.com/TorchSSL/TorchSSL / register

Method register

train_utils.py:361–364  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

359 self.shadow[name] = param.data.clone()
360
361 def register(self):
362 for name, param in self.model.named_parameters():
363 if param.requires_grad:
364 self.shadow[name] = param.data.clone()
365
366 def update(self):
367 for name, param in self.model.named_parameters():

Callers 13

trainMethod · 0.80
trainMethod · 0.80
trainMethod · 0.80
trainMethod · 0.80
trainMethod · 0.80
trainMethod · 0.80
trainMethod · 0.80
trainMethod · 0.80
trainMethod · 0.80
trainMethod · 0.80
trainMethod · 0.80
trainMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected