Here is the output of the print(type(model.module))

<class ‘torch.nn.parallel.data_parallel.DataParallel’>

Another point in the original code is that when there is no torch.nn.DataParallel() code to use multi GPUs, it still uses model.module to access to the class objects and it works. But when I include torch.nn.DataParallel(), it throws the error in my first post.
Edit: When I used model.module.module.optimizer_G, it worked.