criterion = nn.CrossEntropyLoss()
loss = criterion(output[0],y)
It says like this :
RuntimeError: 1D target tensor expected, multi-target not supported
output[0] = tensor([[0.1302, 0.1725, 0.1690, 0.0921, 0.1245, 0.1362, 0.1755]]
y = tensor([[0, 0, 0, 0, 1, 0, 0]])