Small gradients would be a different issue than no gradients at all.
If the .grad attributes in the layers 0 to 4 are None, the computation graph would still be detached at some point. On the other hand, if the gradients are just small e.g. the model architecture might lower the gradient magnitude.