torch.Tensor와 torch.cuda.Tensor의 차이

HeyHo·2022년 7월 15일
0

torch.optim.Adam()을 사용하는 과정에서
'if capturable=false, state_steps should not be cuda tensors.'
에러를 디버깅 하는 과정에서 작성한 포스트이다.

두개는 본질적으로 같다고 한다.
하지만 CPU 메모리를 사용하느냐, GPU 메모리를 사용하느냐에 따라 다르다.

torch.Tensor : CPU 메모리 사용
torch.cuda.Tensor : GPU 메모리 사용

profile
Coputer vision, AI

0개의 댓글