MCPcopy Index your code
hub / github.com/MingchaoZhu/DeepLearning / flush_gradients

Method flush_gradients

code/chapter9.py:940–945  ·  view source on GitHub ↗

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

(self, curr_loss=None)

Source from the content-addressed store, hash-verified

938 self.flush_gradients()
939
940 def flush_gradients(self, curr_loss=None):
941 """
942 函数作用:更新后重置梯度
943 """
944 for k, v in self.layers.items():
945 v.flush_gradients()
946
947 def fit(self, X_train, y_train, n_epochs=20, batch_size=64, verbose=False, epo_verbose=True):
948 """

Callers 2

updateMethod · 0.95
flush_gradientsMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected