PyTorch: why the difference between dir(nn.Module()) and dir(nn.Module)
Tried 

e = dir(nn.Module())
f = dir(nn.Module)
print([item for item in e if item not in f])


It gives 

['_backward_hooks', '_buffers', '_forward_hooks', '_forward_pre_hooks', '_load_state_dict_pre_hooks', '_modules', '_parameters', '_state_dict_hooks', 'training']


why these are only available for the object not class ? 
What's special about these attributes? 

It's the other way around, those attributes are only available on the object (e
 in your case), but not on the class. The reason is simple, those are the attributes that are created in the constructor, hence they don't exist on the class and are only created when the object is created.

From the nn.Module implementation:

def __init__(self):
    """
    Initializes internal Module state, shared by both nn.Module and ScriptModule.
    """
    torch._C._log_api_usage_once("python.nn_module")

    self.training = True
    self._parameters = OrderedDict()
    self._buffers = OrderedDict()
    self._backward_hooks = OrderedDict()
    self._forward_hooks = OrderedDict()
    self._forward_pre_hooks = OrderedDict()
    self._state_dict_hooks = OrderedDict()
    self._load_state_dict_pre_hooks = OrderedDict()
    self._modules = OrderedDict()


There is nothing special about these attributes, they are simply used to track the state of each individual module.
