Difference between torch.nn and torch.nn.functional

Duplicate of What is the difference between torch.nn and torch.nn.functional?

Torch.nn defines Python classes (to be called in forward propagation), while torch.nn.fucntional defines operations which can be directly used.