MCPcopy Create free account
hub / github.com/tdrussell/diffusion-pipe / DummyOptimizer

Class DummyOptimizer

train.py:61–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59
60
61class DummyOptimizer(torch.optim.Optimizer):
62 def __init__(self):
63 self.state = defaultdict(dict)
64 self.param_groups = []
65
66 def step(self, closure=None):
67 pass
68
69 def zero_grad(self, set_to_none: bool = True):
70 pass
71
72 def state_dict(self):
73 return {}
74
75 def load_state_dict(self, state_dict):
76 pass
77
78
79# Monkeypatch this so it counts all layer parameters, not just trainable parameters.

Callers 1

get_optimizerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected