Hy guys, I must do “features sharing”. I must pass the features of resnet 50 (2048) to a MLP
from torchvsion.models import resnet50
class pipo(nn.module):
      def __init__(self,n_input, n_output, n_hidden):
        
            super(pipo, self).__init__()
            self.model = resnet50(pretrained = True)
            self.model.fc = nn.Linear(self.model.fc.in_features, n_input)
            self.fc = nn.Linear(self.model.fc, n_hidden)
            self.mu = nn.Linear(n_hidden, n_output)
     
     def forward(self, x):
            etc...        

is it right in this way?