AI 공부/딥러닝

pytorch 오류

AI Sonny 2022. 12. 23. 16:39
728x90

RuntimeError: result type Float can't be cast to the desired output type Long

 

y의 텐서가 float의 형태가 아니라 생기는 오류였다....

 

dtype=torch.float32 추가하면 float형태로 반환된다!

 

 

 

728x90