预测过程,CNN中对输入x进行mask操作时的维度问题
Describe the question 您好,我在尝试Quick Start进行到python predict.py时出现错误:
RuntimeError: The size of tensor a (19) must match the size of tensor b (512) at non-singleton dimension 2
发现CNN中(x = x.masked_fill_(mask.bool(), 1e-12))对输入进行mask时x与mask的维度无法进行广播,这个怎么解决呢?
Environment (please complete the following information):
- OS: Ubuntu20
- Python Version 3.8
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
打印输出的x和mask1是哪两个向量呢
请问您问题是否已解决?
打印输出的x和mask1是哪两个向量呢
print的mask和x是DeepKE/src/deepke/relation_extraction/standard/module/CNN.py中的,也是在这个地方报的错
目前使用llm已经可以成功使用,感谢回复!