原文:Pytorch报错:view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces). Use .reshape(...) instead.

参考文章: https: blog.csdn.net jorg zhao article details https: blog.csdn.net lhyyhlfornew article details ...

2021-07-14 16:23 0 152 推荐指数:

查看详情

the size of tensor a (539) must match the size of tensor b (512) at non-singleton dimension 1

明明已经对超过512长度的序列做了处理,但这个怎么都处理不了,经过检查发现在对子句之间添加[SEP]标记时,错误的将[SEP]写成了[sep],致使电脑在识别的时候无法将[sep]识别出来,而是识别成了[ , s , e , p , ] 这几个分开的,所以长度比正常的长而且代码也无 ...

Sat Apr 09 18:51:00 CST 2022 3 1006
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM