What is MyModel.module in distrubuted training

i have gone through a peace of code:

if args.distributed:

I read the source code of Distributed training but i didn’t get the purpose of “.module”, if anyone knows?

The .module attribute holds the reference to the plain model (i.e. without the DDP mechanism) and DDP will use it internally for its execution.