MCPcopy Create free account
hub / github.com/MingchaoZhu/DeepLearning / flush_gradients

Method flush_gradients

code/chapter6.py:338–343  ·  view source on GitHub ↗

函数作用:更新后重置梯度

(self, curr_loss=None)

Source from the content-addressed store, hash-verified

336 self.flush_gradients()
337
338 def flush_gradients(self, curr_loss=None):
339 """
340 函数作用:更新后重置梯度
341 """
342 for k, v in self.layers.items():
343 v.flush_gradients()
344
345 def fit(self, X_train, y_train, n_epochs=20, batch_size=64, verbose=False, epo_verbose=True):
346 """

Callers 1

updateMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected