이상한 gpu에 모델이 자꾸 allocated 됨
발단
- line plot을 custom model로 rms 측정 중 cuda out of memory error가 집중적으로 발생
- pdb 디버거를 통해 확인해보았지만, device는 문제가 없었고 inference이기에 큰 메모리 소모도 없었음
- error를 쭉 살펴보니 설정한 gpu인 9이 아닌, 6에 모델이 할당되어있음을 발견
절정

- 요기서 문제 발견
- 모델 저장시 pt 파일은 gpu에 대한 정보도 같이 불러와짐
- 따라서 모델이 load할 때 이전 학습 시 사용한 gpu에 자동으로 할당되는 것
결말

- 모델이 load될 때, cpu로 할당되게끔 함으로서 문제 해결