What's the return model by torch.nn.DataParallel

module is a reference to the model that is packed inside nn.DataParallel.

.modules() is a method inherited from nn.DataParallel’s parent nn.Module.
Refer this post for more info:

1 Like