visinf / 1-stage-wseg

Single-Stage Semantic Segmentation from Image Labels (CVPR 2020)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem about "Was asked to gather along dimension 0"

dongzhang89 opened this issue · comments

I met the following warning when I run bash ./launch/run_voc_resnet38.sh on 8 GPUs. I wonder if this warning would affect model performance?

"anaconda3/lib/python3.6/site-packages/torch/nn/parallel/_functions.py:61: UserWarning: Was asked to gather along dimension 0, but all input tensors were scalars; will instead unsqueeze and return a vector.
warnings.warn('Was asked to gather along dimension 0, but all '"

Thanks.

Hi @ZHANGDONG-NJUST,
I don't think it should be the issue. If I understand correctly, it's probably because the losses are returned from .forward() as scalars, and not as tensors of shape (1, ).
Best,
Nikita

Thanks for your reply. Do you think this may affect the model performance ?