I am new to programming and unable to figure out something. Thanks for help in advance.
So the question is
when we make a class for model
class model(nn.Module):
    def __init__(self,):
         super(model, self).__init__()
         self.featureextract = fext
         self.classifier = classifier
    def forward(self, input):
        x = self.classifier(input)
        return x
   def feature_extract(self,input):
        x = self.featureextract(input)
        return x

So in such a case where I have two functions, how the backpropagation will happen, will the parameters of model contain only the forward part or both. And in case only both, how can I make such a model where the features can be extracted separately, classifier can be made separately and then backpropagation happens on the complete model.