Solved by ptrblck in post #6 
              
              
                Side info: Besides the mentions possibility that you are adding the .module attribute manually, it would also be added automatically by e.g. nn.DataParallel as described here.