Here is a script that does it:

import torch
import torchvision
from torchvision.models.resnet import BasicBlock

class MyResNet(torchvision.models.ResNet):
    def forward(self, x):
        x = self.conv1(x)
        x = self.bn1(x)
        x = self.relu(x)
        x = self.maxpool(x)

        x = self.layer1(x)
        x = self.layer2(x)
        x = self.layer3(x)
        x = self.layer4(x)

        x = self.avgpool(x)
        x = x.view(x.size(0), -1)
        x = self.fc(x)

        # We add to the original net
        x = self.fc2(x)

        return x


my_resnet = MyResNet(BasicBlock, [2, 2, 2, 2], num_classes=10)
my_resnet.fc2 = torch.nn.Linear(10, 1)

inp = torch.rand(1, 3, 224, 224)

out = my_resnet(inp)

print(out.size())