Solved by ptrblck in post #2 
              
              
                nn.NLLLoss and thus also nn.CrossEntropyLoss don’t support float16 tensors on the CPU, if I’m not mistaken, so you could either use the GPU or transform the model output tensor to float32 before calculating the loss. 
Also, in case you don’t want to manually transform your tensors, use the mixed-pre…