MCPcopy Index your code
hub / github.com/Newmu/dcgan_code / __call__

Method __call__

lib/updates.py:63–72  ·  view source on GitHub ↗
(self, params, cost)

Source from the content-addressed store, hash-verified

61 self.__dict__.update(locals())
62
63 def __call__(self, params, cost):
64 updates = []
65 grads = T.grad(cost, params)
66 grads = clip_norms(grads, self.clipnorm)
67 for p,g in zip(params,grads):
68 g = self.regularizer.gradient_regularize(p, g)
69 updated_p = p - self.lr * g
70 updated_p = self.regularizer.weight_regularize(updated_p)
71 updates.append((p, updated_p))
72 return updates
73
74class Momentum(Update):
75

Callers

nothing calls this directly

Calls 3

clip_normsFunction · 0.85
gradient_regularizeMethod · 0.80
weight_regularizeMethod · 0.80

Tested by

no test coverage detected