Skip to content

i can't run this code correctly due to y_onehot.scatter_(1, y, 1).float() in eval_IOU.py #59

@hisrg

Description

@hisrg

hello,
i'll try to run this code in eval_IOU.py, but there are some issue as below:
y_onehot_size: torch.Size([1, 23, 512, 1024])
max(y): tensor(26)
Traceback (most recent call last):
File "eval_iou.py", line 153, in
main(parser.parse_args())
File "eval_iou.py", line 94, in main
iouEvalVal.addBatch(outputs.max(1)[1].unsqueeze(1).data, labels)
File "/workspace/data/ERFNet2/erfnet_pytorch-master/eval/iouEval.py", line 58, in addBatch
y_onehot.scatter_(1, y, 1).float()
RuntimeError: index 26 is out of bounds for dimension 1 with size 23
root@7b72ac96a07e:/workspace/data/ERFNet2/erfnet_pytorch-master/eval#

tha'ts why?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions