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.
i faced the same issue, and you’re right, i am using data parallel, but could you please elaborate how to tackle this?