Hi all, I have problem with NLLLoss, I am getting error message: RuntimeError: “nll_loss_out_frame” not implemented for ‘Long’
This is my code:
for input_tensor, target_tensor in train_dataloader:
log_probs = encoder_decoder((input_tensor,target_tensor))
predicted = log_probs.argmax(dim=1)
loss = loss_function(predicted, target_tensor)
Shape of tensors are predicted.shape = (1,4) and targer_tensor.shape = (1,4).
I tried to change to other tensor type like int, but it doesn’t help. What i am doing wrong here?