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

RuntimeError: "triu" not implemented for 'Bool' #17

Open
PR1706 opened this issue May 23, 2020 · 8 comments
Open

RuntimeError: "triu" not implemented for 'Bool' #17

PR1706 opened this issue May 23, 2020 · 8 comments

Comments

@PR1706
Copy link

PR1706 commented May 23, 2020

请问有人遇到这个问题吗?我的pytorch版本是1.5.0

@TinyZeaMays
Copy link
Owner

TinyZeaMays commented May 27, 2020

Have you checked the version?
print(torch.__version__)

@xuanhanyu
Copy link

也遇到了同样的问题,楼主是否解决

@PR1706
Copy link
Author

PR1706 commented Jun 10, 2020

Have you checked the version?
print(torch.__version__)

Thank you very much.
I tried installing the version pytorch 1.5.0 against and the error was solved.

@PR1706
Copy link
Author

PR1706 commented Jun 10, 2020

也遇到了同样的问题,楼主是否解决

我之前安装的pytorch1.5有问题,所以之后我卸载又重装了,现在就可以跑通这个代码啦,你就安装1.5的pytorch吧,然后Python是3.6的。

@xuanhanyu
Copy link

xuanhanyu commented Jun 11, 2020 via email

@bluoluo
Copy link

bluoluo commented Jun 12, 2020

应该是pytorch版本的问题,我也解决了,换了其中两个语句

请问你的pytorch版本是1.2吗?能否分享下更换了那两句?谢谢

@lihui-QDU
Copy link

应该是pytorch版本的问题,我也解决了,换了其中两个语句

请问你的pytorch版本是1.2吗?能否分享下更换了那两句?谢谢

请问你的问题解决了吗?我也是1.2版本

@yangtao-hub
Copy link

我的torch版本也是1.2.0,将ProbMask()函数中的代码改了一下就好了:
_mask = torch.ones(L, scores.shape[-1], dtype=torch.float).to(device).triu(1) > 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants