princeton-vl / CornerNet

BSD 3-Clause "New" or "Revised" License
2.36k stars 475 forks source link

ERROR: Dimension out of range (expected to be in range of [-2, 1], but got 2) #140

Open Hao-Gong opened 5 years ago

Hao-Gong commented 5 years ago

not only occurs in Cornernet but also in Cornernet-Lite. I cannot know why, please help me, thx!

"CornerNet/models/py_utils/kp_utils.py", line 197, in _ae_loss dist = tag_mean.unsqueeze(1) - tag_mean.unsqueeze(2) RuntimeError: Dimension out of range (expected to be in range of [-2, 1], but got 2)

Hao-Gong commented 5 years ago

FIXED cause my GPU MEM is small that i change the chunk size to 1 and batch to 1.

chong-zheng commented 4 years ago

FIXED cause my GPU MEM is small that i change the chunk size to 1 and batch to 1.

Have you solved your problem? I meet the same problem that the Gpu memory is small. (QAQ)

Glutton-zh commented 4 years ago

@diamour @chong-zheng i use CenterNet and has the same error, i had been read the issues in CenterNet,CornerNet and CornerNet-Lite, but i still dont see the answer. cuda10, torch1.0, torchvision0.2.1, i used env from CornerNet-Lite, batch-size = 1;one gpu-gtx1060ti ———————————————————————— RuntimeError: Dimension out of range (expected to be in range of [-2, 1], but got 2)

bigpo commented 4 years ago

change chunk size to 2 and batch to 2, this works for me.