파이썬 오류2 [파이썬 오류]The following handlers are available to decode the pixel data however they are missing required dependencies: GDCM (req. GDCM), pylibjpeg (req. ) DICOM 파일을 python으로 열거나 저장할때 오류났을때, 해결방법입니다. pip install pylibjpeg pylibjpeg-libjpeg pydicom 출처 : stackoverflow https://stackoverflow.com/questions/62159709/pydicom-read-file-is-only-working-with-some-dicom-images 2023. 3. 9. [파이썬 오류] Expected object of scalar type Long but got scalar type Int for argument #2 'target' in call to _thnn_nll_loss_forward loss = criterion(model_pred, label) 에서 loss 계산할 때 "Expected object of scalar type Long but got scalar type Int for argument #2 'target' in call to _thnn_nll_loss_forward" 오류가 뜸 해석 : 스칼라 유형의 개체가 Long이어야 하지만 _thnn_nll_loss_forward에 호출된 #2 'target' 인수에 대한 스칼라 유형 Int가 있습니다. label의 값을 쳐보니 "int32"로 나옴. 해결방법 : label.to(device) => label.to(device).long() 2022. 10. 10. 이전 1 다음