Solved by JuanFMontesinos in post #8 
              
              
                Sorry, it’s not like I’m not addressing it but I don’t recomend it. 
The main issue  here is that module is a nn.Module. Then it’s hidden in _modules private dict. The way they designed to gather nn.Modules is through getattr. As you are overwritting getattr it gets into a infinity recursion. 
I rea…