youngs508.log
로그인
youngs508.log
로그인
can't convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first.
YoungJoon Suh
·
2022년 9월 2일
팔로우
0
0
correct += (predicted.cpu() == labels.cpu()).sum()
tensor 값에 .cpu()를 붙여서 비교해야 제목의 에러가 사라진다.
YoungJoon Suh
저는 서영준 입니다.
팔로우
이전 포스트
PyTorch JIT
다음 포스트
can't convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first.
0개의 댓글
댓글 작성
관련 채용 정보