DDP를 이용하여 custom model을 학습할 때 model의 attribute에 접근하려면 아래와 같이 하면 돼요.
from torch.nn.parallel import DistributedDataParallel as DDP model = DDP(model, device_ids=[device]) model.module.fit()