RuntimeError: Input type(torch.cuda.FloatTensor) and weight type (torch.FloatTensor) should be the same
원인 : 에러명에서도 알 수 있듯이 하나는 input type과 weight type이 동시에 cuda이어야 하는데 그게 아니라서 그렇다.
다시 말해 input type(x,y)는 cuda를 먹였는데 weight type(신경망)은 cuda를 먹이지 않아서 생기는 에러.
해결책 : 내가 사용하는 model도 cuda를 사용하게 해주면 된다.
model_scratch.to("cuda").train()