law vjp_mul

bendtorch-core@0.1.0.0 · src/autograd/backward_LAWS.bend:201

import bendtorch-core@0.1.0.0/src/autograd/backward_LAWS.bend as BackwardLAWS
import Base
import bendtorch-core@0.1.0.0/src/autograd/backward.bend as Backward

201# d(a*b)/da = b and d(a*b)/db = a, with the operand values saved at record
202# time: the first operand receives g * right, the second g * left.
203law vjp_mul:
204  for +a: Nat
205  for +b: Nat
206  for +left: F32
207  for +right: F32
208  for +g: F32
209  {Backward.vjp(Backward.Mul{a, b, left, right}, g) ==
210    [Backward.Contribution{a, F32.mul(g, right)}, Backward.Contribution{b, F32.mul(g, left)}] : List<&2, Backward.Contribution>}

Uses (7)

Used by (0)

No other definition uses this definition.