ptrblck:

target = torch.Tensor(N, 8, 8).random_(0, C)


Ok, this time no error, however when I proceed to run the next line:
output = loss(m(data), target)
I get this error:
RuntimeError: Expected object of type torch.LongTensor but found type torch.FloatTensor for argument #2 ‘target’