How do I finetune a model while preserving layer names

When I fine tune a pretrained resnet152 model, I seem to lose all the named layers I’d like access to. I’ve include the simple fine tuned model, and the named layers of both pretrained and fine tuned. TIA.

class ConvNet3(nn.Module):

 def __init__(self):
    model = models.resnet152(pretrained=True)
    model.fc = nn.Linear(2048, 10)
    self.model = model
def forward(self, x):        
    return self.model(x) # [batch_size, 10]

The named layer printouts as follows:

import torchvision.models as models
model = ConvNet3().eval()
print([n for n, _ in model.named_children()])

model = models.resnet152(pretrained=True).eval()
print([n for n, _ in model.named_children()])

Output from above print statements

[‘conv1’, ‘bn1’, ‘relu’, ‘maxpool’, ‘layer1’, ‘layer2’, ‘layer3’, ‘layer4’, ‘avgpool’, ‘fc’]

TIL that the resnet model gets wrapped in ConvNet3. So ‘model.model.named_children’ in the first print statement would have worked.