Gradientflow through UNets

hello,

I’m curious about how you backpropagate through a Unet skip connection. Do you just ignore the gradients of the part that skipped from the downward part or are they retained like in resnets? In other words do you backprop through those skip connections or are they really only there to get features from one end to the other. And if you backprop through them ,how?

example

U-Net typically concatenates the output from encoding blocks to the decoding blocks.
Backprop is a normal backprop depending on the envolded ops (usually upsimpling or upconvolution).

@ JuanFMontesinos so you just ingnore the skip connections when you backprop through the network

No. The backward of “using the same value twice” is “add the gradients from both uses”.

More formally if you have a function of three parameters f(x, y, z) and now consider
g(u, v) = f(u, u, v) (with u twice), you have that (under suitable conditions) dg/du = df/dx + df/dy .

Best regards

Thomas

1 Like

thanks you so much! Already thought it couldnt be quite right to just ingore those connections.
have a nice day :slight_smile: