Actual computation of gradient of the loss wrt. each input
(self, dLdY, X, _sum)
| 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 | |
| 745 | class Multiply(LayerBase): |