Why when defining IdentityBlock activation function was taken before xt add in?

In lecture ‘Coding a Residual network with the Model class’, there is a code x = self.act(x) after the second BatchNormalization layer, but shouldn’t xt be injected before the activation part??

Yeah you are right in the diagram is not activating at that point, its adding the X and then activating. This is also happening in the ungraded lab Lab 2 : Implementing ResNet and its the right way because if you activate the X at that point, then summing it with original X will not be compliant. It is clearly a typo but I will raise an issue for them to have a look at it.

1 Like