MCPcopy Create free account
hub / github.com/PrathamLearnsToCode/paper2code / restore

Method restore

skills/paper2code/worked/ddpm/src/utils.py:239–243  ·  view source on GitHub ↗

Restore original model weights (after evaluation).

(self, model: nn.Module)

Source from the content-addressed store, hash-verified

237 param.data.copy_(self.shadow[name])
238
239 def restore(self, model: nn.Module):
240 """Restore original model weights (after evaluation)."""
241 # NOTE: This requires storing original weights separately.
242 # The caller should save model.state_dict() before calling apply().
243 pass

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected