Can something be done to fix this hierarchy?

torch.nn.modules.module.Module

shouldn’t it be something like

torch.nn.modules.Module

or maybe just torch.nn.modules

why are there multiple keywords for same name in the hierarchy?

similarly there is

torch.nn.modules.activation.torch

multiple same names in the hierarchy, isn’t this a bug that needs to be fixed?

I’m pretty sure the hierarchy is for encapsulating certain functions.
For example, with torch.nn.modules.module, folder modules contains module.py which in itself contains a Module class.

Feel free to check out the repository as it provides much better context as to why the functions are organized in the manner they are: https://github.com/pytorch/pytorch/tree/master/torch/nn/modules