제목 그대로 pytorch lightning을 사용하다 보면 갑자기 듣도 보도 못한 에러를 만날 때가 있다. RuntimeError: Trying to resize storage that is not resizable 에러의 기본적인 의미는 사용하는 torch tensor가 numpy array랑 메모리를 공유하도록 되어있어서 tensor를 함부로 resize할 수 없다는 뜻인데 일반적인 상황에서 torch.from_numpy() 같은 걸 썼다면 단순히 끝에 .clone()을 붙여주면 해결되는 문제다. (아니면 numpy array를 깊은 복사해서 사용하거나) 근데 pytorch lightning이랑 사용할 때는 문제가 감추어져 있더라. pytroch lightning은 데이터셋만 정의하면 나머지 로딩은..