@anhco989 When the Network class is instantiated (Ex: net = Network()), all the statements within __init__ are executed (the constructor). Later, when you run your network on some batch of data, you write output = net(x), which invokes the __call__ method. Your Network class simply inherits the  __call__ method of the nn.Module class. It is here where the forward method is called.