sithu31296 / semantic-segmentation

SOTA Semantic Segmentation Models in PyTorch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RuntimeError: value cannot be converted to type uint8_t without overflow: -1

ricvolpi opened this issue · comments

Thanks for making your repo public.

I tried the code with Python 3.9.13, pytorch-1.9.1, torchvision-0.10.1.

Launching python tools/train.py --cfg configs/ade20k.yaml I get the error

  File "/PATH/.conda/envs/sistools/lib/python3.9/site-packages/torch/nn/functional.py", line 4153, in _pad
    return _VF.constant_pad_nd(input, pad, value)
RuntimeError: value cannot be converted to type uint8_t without overflow: -1

I'll look for a fix, but it would be great to know the exact python/pytorch/torchvision versions you used to run the code.

Changing IGNORE_LABEL from -1 to 255 in config files fixes this

See #24

@ricvolpi loss goes to Nan for some reason when I change it to 255. Some pointers would be helpful.