Basically I am trying to implement different learning rate for different layers in my modified ResNet50. My code below.
class ResNet50(nn.Module):
    def __init__(self, pretrained):
        super(ResNet50, self).__init__()
        if pretrained is True:
            self.model = models.resnet50(pretrained="imagenet")
        else:
            self.model = models.resnet50(pretrained=None)

        self.l0 = nn.Linear(2048, 2) 
        self.l1 = nn.Linear(2048, 2)  
        self.l2 = nn.Linear(2048, 2)  
  

    def forward(self, x):
        bs, _, _, _ = x.shape
        x = self.model.features(x)
        x = F.adaptive_avg_pool2d(x, 1).reshape(bs, -1)
        l0  = self.l0(x)
        l1  = self.l1(x)
        l2  = self.l2(x)

        return l0, l1, l2

model = ResNet50(pretrained=True)

for name, param in model.named_parameters():
    if param.requires_grad:
        print(name)

The output looks like:
model.conv1.weight
model.bn1.weight
model.bn1.bias
model.layer1.0.conv1.weight
model.layer1.0.bn1.weight
model.layer1.0.bn1.bias
model.layer1.0.conv2.weight
model.layer1.0.bn2.weight
model.layer1.0.bn2.bias
model.layer1.0.conv3.weight
model.layer1.0.bn3.weight
model.layer1.0.bn3.bias
model.layer1.0.downsample.0.weight
model.layer1.0.downsample.1.weight
model.layer1.0.downsample.1.bias
model.layer1.1.conv1.weight
model.layer1.1.bn1.weight
model.layer1.1.bn1.bias
model.layer1.1.conv2.weight
model.layer1.1.bn2.weight
model.layer1.1.bn2.bias
model.layer1.1.conv3.weight
model.layer1.1.bn3.weight
model.layer1.1.bn3.bias
model.layer1.2.conv1.weight
model.layer1.2.bn1.weight
model.layer1.2.bn1.bias
model.layer1.2.conv2.weight
model.layer1.2.bn2.weight
model.layer1.2.bn2.bias
model.layer1.2.conv3.weight
model.layer1.2.bn3.weight
model.layer1.2.bn3.bias
model.layer2.0.conv1.weight
model.layer2.0.bn1.weight
model.layer2.0.bn1.bias
model.layer2.0.conv2.weight
model.layer2.0.bn2.weight
model.layer2.0.bn2.bias
model.layer2.0.conv3.weight
model.layer2.0.bn3.weight
model.layer2.0.bn3.bias
model.layer2.0.downsample.0.weight
model.layer2.0.downsample.1.weight
model.layer2.0.downsample.1.bias
model.layer2.1.conv1.weight
model.layer2.1.bn1.weight
model.layer2.1.bn1.bias
model.layer2.1.conv2.weight
model.layer2.1.bn2.weight
model.layer2.1.bn2.bias
model.layer2.1.conv3.weight
model.layer2.1.bn3.weight
model.layer2.1.bn3.bias
model.layer2.2.conv1.weight
model.layer2.2.bn1.weight
model.layer2.2.bn1.bias
model.layer2.2.conv2.weight
model.layer2.2.bn2.weight
model.layer2.2.bn2.bias
model.layer2.2.conv3.weight
model.layer2.2.bn3.weight
model.layer2.2.bn3.bias
model.layer2.3.conv1.weight
model.layer2.3.bn1.weight
model.layer2.3.bn1.bias
model.layer2.3.conv2.weight
model.layer2.3.bn2.weight
model.layer2.3.bn2.bias
model.layer2.3.conv3.weight
model.layer2.3.bn3.weight
model.layer2.3.bn3.bias
model.layer3.0.conv1.weight
model.layer3.0.bn1.weight
model.layer3.0.bn1.bias
model.layer3.0.conv2.weight
model.layer3.0.bn2.weight
model.layer3.0.bn2.bias
model.layer3.0.conv3.weight
model.layer3.0.bn3.weight
model.layer3.0.bn3.bias
model.layer3.0.downsample.0.weight
model.layer3.0.downsample.1.weight
model.layer3.0.downsample.1.bias
model.layer3.1.conv1.weight
model.layer3.1.bn1.weight
model.layer3.1.bn1.bias
model.layer3.1.conv2.weight
model.layer3.1.bn2.weight
model.layer3.1.bn2.bias
model.layer3.1.conv3.weight
model.layer3.1.bn3.weight
model.layer3.1.bn3.bias
model.layer3.2.conv1.weight
model.layer3.2.bn1.weight
model.layer3.2.bn1.bias
model.layer3.2.conv2.weight
model.layer3.2.bn2.weight
model.layer3.2.bn2.bias
model.layer3.2.conv3.weight
model.layer3.2.bn3.weight
model.layer3.2.bn3.bias
model.layer3.3.conv1.weight
model.layer3.3.bn1.weight
model.layer3.3.bn1.bias
model.layer3.3.conv2.weight
model.layer3.3.bn2.weight
model.layer3.3.bn2.bias
model.layer3.3.conv3.weight
model.layer3.3.bn3.weight
model.layer3.3.bn3.bias
model.layer3.4.conv1.weight
model.layer3.4.bn1.weight
model.layer3.4.bn1.bias
model.layer3.4.conv2.weight
model.layer3.4.bn2.weight
model.layer3.4.bn2.bias
model.layer3.4.conv3.weight
model.layer3.4.bn3.weight
model.layer3.4.bn3.bias
model.layer3.5.conv1.weight
model.layer3.5.bn1.weight
model.layer3.5.bn1.bias
model.layer3.5.conv2.weight
model.layer3.5.bn2.weight
model.layer3.5.bn2.bias
model.layer3.5.conv3.weight
model.layer3.5.bn3.weight
model.layer3.5.bn3.bias
model.layer4.0.conv1.weight
model.layer4.0.bn1.weight
model.layer4.0.bn1.bias
model.layer4.0.conv2.weight
model.layer4.0.bn2.weight
model.layer4.0.bn2.bias
model.layer4.0.conv3.weight
model.layer4.0.bn3.weight
model.layer4.0.bn3.bias
model.layer4.0.downsample.0.weight
model.layer4.0.downsample.1.weight
model.layer4.0.downsample.1.bias
model.layer4.1.conv1.weight
model.layer4.1.bn1.weight
model.layer4.1.bn1.bias
model.layer4.1.conv2.weight
model.layer4.1.bn2.weight
model.layer4.1.bn2.bias
model.layer4.1.conv3.weight
model.layer4.1.bn3.weight
model.layer4.1.bn3.bias
model.layer4.2.conv1.weight
model.layer4.2.bn1.weight
model.layer4.2.bn1.bias
model.layer4.2.conv2.weight
model.layer4.2.bn2.weight
model.layer4.2.bn2.bias
model.layer4.2.conv3.weight
model.layer4.2.bn3.weight
model.layer4.2.bn3.bias
model.fc.weight
model.fc.bias
l0.weight
l0.bias
l1.weight
l1.bias
l2.weight
l2.bias

But when I try this
param_groups = [
    [model.conv1, model.bn1, model.layer1, model.layer2],
    [model.layer3, model.layer4],
    [model.fc.weight, model.fc.bias]
]

lrs = np.array([lr / 10, lr / 3, lr])

I get following error
AttributeError                            Traceback (most recent call last)
<ipython-input-110-28b2b69ee3ca> in <module>
      1 param_groups = [
----> 2     [model.conv1, model.bn1, model.layer1, model.layer2],
      3     [model.layer3, model.layer4],
      4     [model.fc.weight, model.fc.bias]
      5 ]

~/.local/lib/python3.6/site-packages/torch/nn/modules/module.py in __getattr__(self, name)
    533                 return modules[name]
    534         raise AttributeError("'{}' object has no attribute '{}'".format(
--> 535             type(self).__name__, name))
    536 
    537     def __setattr__(self, name, value):

AttributeError: 'ResNet50' object has no attribute 'conv1'