mark
Consider the expression graph G:
Perform backpropagation through this graph using the rules:
if node.op == "add":
a, b = node.inputs
a.grad += node.grad
b.grad += node.grad
elif node.op == "mul":
a, b = node.inputs
a.grad += node.grad * b.value
b.grad += node.grad * a.value
Comment
The backpropagation into y comes from the sum of two mul nodes. This is exactly the form that stumped me in class, which is why I've include the code defining those rules.