MCPcopy Create free account
hub / github.com/chenhaoxing/HDNet / optimize_parameters

Method optimize_parameters

models/hdnet_model.py:59–64  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

57 self.loss_G.backward()
58
59 def optimize_parameters(self):
60 self.forward()
61 # update G
62 self.optimizer_G.zero_grad() # set G's gradients to zero
63 self.backward_G() # calculate graidents for G
64 self.optimizer_G.step() # udpate G's weights
65

Callers

nothing calls this directly

Calls 2

forwardMethod · 0.95
backward_GMethod · 0.95

Tested by

no test coverage detected