Closed linzhk closed 3 years ago
I got a bug in the following code: target = target[:, :torch.max(length).data[0]].contiguous().view(-1) and it fixed when I change code into: target = target[:, :torch.max(length).data].contiguous().view(-1)
target = target[:, :torch.max(length).data[0]].contiguous().view(-1)
target = target[:, :torch.max(length).data].contiguous().view(-1)
the original code is supported by pytorch 0.4.X, which data[0] can be used
fixed by #21
I got a bug in the following code:
target = target[:, :torch.max(length).data[0]].contiguous().view(-1)
and it fixed when I change code into:target = target[:, :torch.max(length).data].contiguous().view(-1)