Why do we pass nn.Module as an argument to class definition for neural nets?
I want to understand why we pass torch.nn.Module as a argument when we define the class for a neural network like GAN's  

import torch
import torch.nn as nn

class Generator(nn.Module):
    def __init__(self, input_size, hidden_size, output_size, f):
        super(Generator, self).__init__()
        self.map1 = nn.Linear(input_size, hidden_size)
        self.map2 = nn.Linear(hidden_size, hidden_size)
        self.map3 = nn.Linear(hidden_size, output_size)
        self.f = f


This line

class Generator(nn.Module):


simple means the Generator class will inherit the nn.Module class, it is not an argument.

However, the dunder init method:

def __init__(self, input_size, hidden_size, output_size, f):


Has self which is why you may consider this as an argument. 

Well this is Python class instance self. There were tinkering battles should it stay or should it go, but Guido, explained in his blog why it has to stay. 
