with inputs: tensor([[3, 7, 2, 9, 0, 1, 8, 5, 4, 6]])
and target: tensor([[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]])
I get the following error:
/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py in _slow_forward(self, *input, **kwargs)
463 tracing_state._traced_module_stack.append(self)
464 try:
--> 465 result = self.forward(*input, **kwargs)
466 finally:
467 tracing_state.pop_scope()
<ipython-input-217-844f2c5b2d6a> in forward(self, inputs, target)
80
81
---> 82 return loss / seq_len
RuntimeError: Expected object of type torch.FloatTensor but found type torch.LongTensor for argument #2 'other'
When calling:
with inputs: tensor([[3, 7, 2, 9, 0, 1, 8, 5, 4, 6]]) and target: tensor([[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]]) I get the following error:
And PointerNetwork is: