无法计算 __inference_pruned_8945,因为输入 #0(从零开始)预计是 int64 张量,但实际上是 int32 张量 [Op:__inference_pruned_8945]

发布于 01-17 15:10 字数 493 浏览 1 评论 0原文

我正在尝试执行Bleurt Matric的任务。当我尝试执行得分手时,我是Bleurt的新手。

from bleurt import score

checkpoint = r".\bleurt\test_checkpoint"

references = ["This is a test."]

candidates = ["This is the test."]

scorer = score.BleurtScorer(checkpoint)

scores = scorer.score(references=references, candidates=candidates)

assert type(scores) == list and len(scores) == 1
print(scores)

当我尝试执行代码时,我会得到此错误

InvalidArgumentError:无法计算__inference_pruned_8945作为输入#0(基于零)(零)是INT64张量

I am trying to execute bleurt matric for my task. I am new to bleurt when I try to execute scorer.score I get an error.

from bleurt import score

checkpoint = r".\bleurt\test_checkpoint"

references = ["This is a test."]

candidates = ["This is the test."]

scorer = score.BleurtScorer(checkpoint)

scores = scorer.score(references=references, candidates=candidates)

assert type(scores) == list and len(scores) == 1
print(scores)

when i try to execute the code i get this error

InvalidArgumentError: cannot compute __inference_pruned_8945 as input #0(zero-based) was expected to be a int64 tensor but is a int32 tensor [Op:__inference_pruned_8945]

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文