torch.optim.Adam()을 사용하는 과정에서 'if capturable=false, state_steps should not be cuda tensors.' 에러를 디버깅 하는 과정에서 작성한 포스트이다.
두개는 본질적으로 같다고 한다. 하지만 CPU 메모리를 사용하느냐, GPU 메모리를 사용하느냐에 따라 다르다.
torch.Tensor : CPU 메모리 사용 torch.cuda.Tensor : GPU 메모리 사용