Access to attributes of model wrapped in DDP

one can also reference the model inside ddp and work on the reference to avoid ddp.modul.attr.
so, the optimizer can work on ddp, but you can do everything else over the reference.
see this.
the example.