CircleLoss icon indicating copy to clipboard operation
CircleLoss copied to clipboard

RuntimeError: "triu" not implemented for 'Bool'

Open PR1706 opened this issue 4 years ago • 8 comments

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

PR1706 avatar May 23 '20 11:05 PR1706

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

TinyZeaMays avatar May 27 '20 11:05 TinyZeaMays

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

xuanhanyu avatar Jun 09 '20 12:06 xuanhanyu

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 avatar Jun 10 '20 02:06 PR1706

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

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

PR1706 avatar Jun 10 '20 02:06 PR1706

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

xuanhanyu avatar Jun 11 '20 06:06 xuanhanyu

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

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

bluoluo avatar Jun 12 '20 04:06 bluoluo

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

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

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

lihui-QDU avatar Sep 14 '20 02:09 lihui-QDU

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

yangtao-hub avatar Dec 03 '21 12:12 yangtao-hub