Solved by alexis-jacq in post #2 
              
              
                Because it uses the __call__ method implemented in any nn.Module that applies the forward method. For example: 
class MulByFive():
    def __init__(self):
        self.x = 5

    def forward(self, input):
        return self.x * input
    
    def __call__(self, input):
        return self.forward(i…