Tensor Type Issue

The NLLLoss expects the target class index. Maybe this could help. Otherwise, try reading the documentation at https://pytorch.org/docs/stable/nn.html#.