https://stackoverflow.com/questions/51009687/pytorch-unable-to-get-repr-for-class-torch-tensor
Pytorch, Unable to get repr for <class 'torch.tensor'="">
I'm implementing some RL in PyTorch and had to write my own mse_loss function (which I found on Stackoverflow ;) ). The loss function is: def mse_loss(input_, target_): return torch.sum( ...
stackoverflow.com
ㅋㅋㅋ
무슨 일이 있었냐면, BERT pretrain 코드를 짜는데
line 195에 오류가 있는데 그냥 에러 없이 돌아가놓고 line 197에서 이유를 알 수 없는 에러가 남ㅋ
device-side assert라고.
근데 이걸 디버깅하려면 device를 CPU로 바꾸어야 오류 원인이 정확히 에러 메세지로 뜸.
'기타' 카테고리의 다른 글
torch mm, bmm, matmul 차이 (0) | 2020.04.16 |
---|---|
Tensorboard와 OSError: [Errno 12] Cannot allocate memory 에러 (0) | 2020.04.06 |
shutil 패키지를 이용해서 python에서 파일 복사/이동/삭제하기 (0) | 2020.03.27 |
특정 git branch만 clone하기 (0) | 2020.02.06 |
git rest을 이용해 unstage하거나 unroll하기 (0) | 2020.02.06 |