How does model(data) == self.linear(data)

In the lecture, it was said that this topic would be explained, but I’ve finished it and still don’t understand it.

The nn.Module has a defined __call__ method. This is what is called when you run model(data).

The __call__ itself uses forward() method (among many other things).

I’m assuming that this model has only one module: nn.Linear which it calls inside its forward() method.

1 Like