r2c icon indicating copy to clipboard operation
r2c copied to clipboard

AttributeError: 'ScatterableList' object has no attribute 'cuda'

Open jaeyun95 opened this issue 6 years ago • 7 comments
trafficstars

i have a problem like this: Traceback (most recent call last): File "eval_for_leaderboard.py", line 110, in batch = _to_gpu(batch) File "eval_for_leaderboard.py", line 74, in _to_gpu td[k] = {k2: v.cuda(async=True) for k2, v in td[k].items()} if isinstance(td[k], dict) else td[k].cuda( AttributeError: 'ScatterableList' object has no attribute 'cuda'

what can i do?

thank you:)

jaeyun95 avatar Mar 13 '19 14:03 jaeyun95

sorry for the delay -- are you trying with 3 GPUs or just 1?

rowanz avatar Mar 25 '19 17:03 rowanz

sorry for the delay -- are you trying with 3 GPUs or just 1?

just 1 GPU!!

jaeyun95 avatar Mar 29 '19 14:03 jaeyun95

안녕하세요 한국인이신거같아서 여쭤보는데 저도 gpu1개라 같은 에러가 나는데 혹시 해결 하셨나요??

woosikyang avatar Nov 20 '19 15:11 woosikyang

아니요! 저 때 해결 못하고 eval_q2ar.py로만 성능평가했습니다!

jaeyun95 avatar Nov 28 '19 17:11 jaeyun95

코드 까보니까 딕셔너리 키중에 metadata문제더라구요 train.py 보시면 metadata일경우 cuda 변화 안시키게 _to_gpu함수 변경한거 있으니 그거로 바꿔서 다시 돌리시면 돌아갈겁니다!

woosikyang avatar Nov 29 '19 05:11 woosikyang

I got the same error but found "export CUDA_VISIBLE_DEVICES=0,1,2" is the solution. So, the code assumes we use 3 GPUs.

yekeren avatar May 02 '20 23:05 yekeren

Hi I am getting the same error right now and it is not being fixed by the above mentioned solutions. I am using 1 GPU for this.

Any help?

arjunsinghrana avatar May 28 '21 06:05 arjunsinghrana