Given a Computation Graph with a node (like the one below), I understand that I can use the upstream gradient dL/dz to calculate all of my downstream gradients.
But what if there are multiple upstreams? Would the final upstream gradient just be the sum of the derivatives? Or the product? Or the mean? Or something else?
For example, instead of just 1 upstream: [z]
, we are given 3 upstreams: [z0, z1, z2]
:
dL/dz = dL/dz0 + dL/dz1 + dL/dz2 // sum?
dL/dz = dL/dz0 * dL/dz1 * dL/dz2 // or product?
dL/dz = (dL/dz0 + dL/dz1 + dL/dz2) / 3 // or mean?