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

Method grad

code/chapter6.py:222–224  ·  view source on GitHub ↗
(y_true, y_pred, z, acti_fn)

Source from the content-addressed store, hash-verified

220
221 @staticmethod
222 def grad(y_true, y_pred, z, acti_fn):
223 (n, _) = y_true.shape
224 return (y_pred - y_true) * acti_fn.grad(z) / n
225
226
227class CrossEntropy(ObjectiveBase):

Callers 2

_bwdMethod · 0.45
fitMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected