Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError:can't convert np.ndarray of type numpy.bool_ #6

Open
menggehe opened this issue Jul 19, 2019 · 2 comments
Open

TypeError:can't convert np.ndarray of type numpy.bool_ #6

menggehe opened this issue Jul 19, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@menggehe
Copy link

Traceback (most recent call last):
File "main.py", line 89, in
num_predict=args.num_predict)
File "/home/hemengge/xlnet-pytorch/data_utils.py", line 335, in make_permute
is_masked = torch.Tensor(feature.pop("is_masked"))

TypeError: can't convert np.ndarray of type numpy.bool_. The only supported types are: double, float, float16, int64, int32, and uint8

@LorraineLo4
Copy link

Having the same issue.

@xingchensong
Copy link

is_masked = torch.ByteTensor(feature.pop("is_masked").copy().astype(np.uint8)) @menggehe

@graykode graykode added the bug Something isn't working label Sep 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants