Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
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
227
class
CrossEntropy(ObjectiveBase):
Callers
2
_bwd
Method · 0.45
fit
Method · 0.45
Calls
no outgoing calls
Tested by
no test coverage detected