Hi, thank you for your mention. It turns out that I misunderstood the 0-dimensional tensors in 0.4.0.
BTW,
The CroosEntropoy loss begins to support any size of input from 0.4.0.
https://pytorch.org/docs/stable/nn.html?highlight=crossentropyloss#torch.nn.CrossEntropyLoss 13
In 0.3.0, the input of CrossEntropy loss has to be a 2D tensor of size. https://pytorch.org/docs/0.3.0/nn.html?highlight=crossentropyloss#torch.nn.CrossEntropyLoss 2