Oscar_Rangel:

so when this person in the internet is declaring this way the resnet, he is using the finetune technique, right ?


Not necessarily. I refer to “fine tuning” as using pretrained parameters and train the model on another dataset.
The author of the mentioned code snippet creates a new model called MyResNeXt by deriving from models.resnet.ResNet as the base model. This allows him to use all parent modules and might implementing his model easier.
The author doesn’t have to use the pretrained parameters of the base class, so it’s unrelated to a fine tuning task.



 Oscar_Rangel:

where to find information of how to instantiate the ResNet 50 this way?


I would recommend to use the torchvision.models 3, if they fit your use case. Initializing the resnet “manually” as shown in your code snippet is needed, if you want to manipulate the model in a non-trivial way (e.g. change whole blocks inside the model etc.).



 Oscar_Rangel:

can you point me where to learn how to concatenate models in Pytorch, or how you call this technique?


I might have used the wrong wording again, but there is not really anything special about this approach.
You are writing models in the same way by just passing the output of one layer to the next one:
class MyModel(nn.Module):
    def __init__(self):
        super(MyModel, self).__init__()
        self.conv1 = nn.Conv2d(3, 6, 3, 1, 1)
        self.conv2 = nn.Conv2d(3, 6, 3, 1, 1)
        self.act = nn.ReLU()
        
    def forward(self, x):
        x = self.act(self.conv1(x))
        x = self.conv2(x)
        return x

In this example you are passing the output of the first convolution to the next one.
Since MyModel derives from nn.Module it can be treated as all other nn.Modules e.g. nn.Conv2d.