JLConc:

Expected object of scalar type Double but got scalar type Long for sequence element


The problem was caused, because the tensor-type wasn’t defined in the ToTensor() function. After adding target.type(torch.FloatTensor) everything works.