I have the same question as OP which I don’t think was answered by @surya00060
If model.name_modules() contains names for all the different layers, there must be a way to access the layers by using the name string, No?
The name is much more convenient than something like:
model.layer1[0].relu