无法计算 __inference_pruned_8945,因为输入 #0(从零开始)预计是 int64 张量,但实际上是 int32 张量 [Op:__inference_pruned_8945]
我正在尝试执行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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论