[pytorch] AttributeError: DistributedDataParallel has no attribute


[pytorch] AttributeError: DistributedDataParallel has no attribute

[pytorch] AttributeError: DistributedDataParallel has no attribute :: whiteBoard (tistory.com) 학습된 모델과 파라미터를 로드해 특정 레이어를 제외한 나머지 레이어의 _weight_을 freeze하고 finetuning하고자 하다가 또 어이없는 실수를 하고 말아 다시 정리한다. apex.parallel DistributedDataParallel 을 이용해 학습 DistributedDataParallel 을 이용해 학습 도중 _model.state_dict()_을 저장 학습 하던 모델에서 backbone 및 특정 _head_의 _weight_만 학습 시키기 위해 학습을 원하지 않는 _tensor_의 _requires_grad_를 _False_로 세팅 한다. 대략 적인 코드는 다음과 같다. 위와 같은 작업 흐름을 따라 갈 경우 아래와 같은 에..........



원문링크 : [pytorch] AttributeError: DistributedDataParallel has no attribute