Which layer would you like to get?
This code would index a specific conv layer inside the model:
model = models.densenet121()
model.features.denseblock4.denselayer2.conv2

Your mentioned method is an internal method and thus shouldn’t generally be used.