Open mfelice opened 3 years ago
OK, I think I found the problem.
should be changed to:
out = torch.reshape(out[0], (out[0].shape[0], -1))
squeeze()
was removing a dimension that should be preserved.
Hurray for publicly licensed software and donation of labour to the public good!
Hi there,
I'm using the PyTorch implementation with
bert-base-uncased
and I get the following error when the sentence contains only one token:It works fine with MXNet MLMs, but I need to use a community model from HuggingFace.
Thanks!