Open
Description
def mul(self, other):
other = other if isinstance(other, Value) else Value(other)
out = Value(self.data * other.data, (self, other), '*')
def _backward():
self.grad += other.data * out.grad
other.grad += self.data * out.grad
out._backward = _backward
return out
If you have an expression of type (xy)(x*z) then the gradient w.r.t x is not additive, right?
Metadata
Metadata
Assignees
Labels
No labels