Skip Connections in Residual Modules I am a beginner in CNN theory and would like to understand the usage of residual modules better.
As far as I understand residual modules can be skipped, only the activation function must be computed with the given input.

My question is: How does the network know if it should skip the residual module or not?
Residual blocks contain weights as you can see in this overview of some different variants:


Source: this blog post

Since weights are learned parameters the neural net can learn to use or not use non-skip/non-identity paths, i.e. by optimizing with gradient descent the network can learn to skip these blocks (or not). 

To phrase it differently: the networks "knows" by following the opposite direction of the gradient.