RuntimeError: multi-target not supported

Using ColumnarModelData and custom MixedInputs class.
Size of y (target) seems to be BatchSize x 1 with each a class index int.
Found a Pytorch forum thread that stated to squeeze the tensor to vector but squeezing y when input into the CMData object and other spots did not work.
Literally cannot stare at this(or anything) at the moment.
Using CrossEntropy Loss in StructuredLearner.
Am sure it is an easy fix someone else will find.

1052 return torch._C._nn.nll_loss(input, target, weight, size_average, ignore_index, reduce)
1053 elif dim == 4:
1054 return torch._C._nn.nll_loss2d(input, target, weight, size_average, ignore_index, reduce)

RuntimeError: multi-target not supported at /opt/conda/conda-bld/pytorch_1518244421288/work/torch/lib/THNN/generic/ClassNLLCriterion.c:22

1 Like

Did you happen to sove this?

have you fixed it? I meet the same problem