I am following this tutorial 101 and I am confused by the part where the forward method is defined. Specifically, from the tutorial, we have this class
class Mnist_Logistic(nn.Module):
    def __init__(self):
        super().__init__()
        self.lin = nn.Linear(784, 10)

    def forward(self, xb):
        return self.lin(xb)

. Then, when we do
model = Mnist_Logistic()
print(loss_func(model(xb), yb))

, model(xb) uses the forward method automatically. Why can we do that instead of doing something like print(loss_func(model.forward(xb),yb))?
Thank you!