MCPcopy
hub / github.com/ddbourgin/numpy-ml / _bwd

Method _bwd

numpy_ml/neural_nets/layers/layers.py:739–742  ·  view source on GitHub ↗

Actual computation of gradient of the loss wrt. each input

(self, dLdY, X, _sum)

Source from the content-addressed store, hash-verified

737 return grads[0] if len(X) == 1 else grads
738
739 def _bwd(self, dLdY, X, _sum):
740 """Actual computation of gradient of the loss wrt. each input"""
741 grads = [dLdY * self.act_fn.grad(_sum) for _ in X]
742 return grads
743
744
745class Multiply(LayerBase):

Callers 1

backwardMethod · 0.95

Calls 1

gradMethod · 0.45

Tested by

no test coverage detected