How to suppress this warning?

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 ’

You are probably using DataParallel but returning a scalar in the network. You should return a batched output.

1 Like

i faced the same issue, and you’re right, i am using data parallel, but could you please elaborate how to tackle this?

2 Likes