FewRel icon indicating copy to clipboard operation
FewRel copied to clipboard

AttributeError: 'str' object has no attribute 'size'

Open dengxingzhi opened this issue 1 year ago • 2 comments

您好,在我使用"python train_demo.py --encoder roberta --pretrain_ckpt /model/roberta-base"命令时,运行到proto.py的37行出现了"AttributeError: 'str' object has no attribute 'size'“错误,我进行了debug,然后发现proto.py中的第34行support_emb的值是一个str类型,但是却在37行使用了.size属性,为什么会出现这种情况呢,self.sentence_encorder(support)返回的是一个字符类型吗?我该怎么处理呢,谢谢

dengxingzhi avatar Nov 23 '23 15:11 dengxingzhi

您好,您这个解决了吗

luckinoffice avatar May 10 '24 08:05 luckinoffice

请问解决了吗

luoweiqi7 avatar Jul 10 '24 11:07 luoweiqi7