thunlp / FewRel

A Large-Scale Few-Shot Relation Extraction Dataset
https://thunlp.github.io/fewrel.html
MIT License
731 stars 165 forks source link

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

Open dengxingzhi opened 1 year ago

dengxingzhi commented 1 year ago

您好,在我使用"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)返回的是一个字符类型吗?我该怎么处理呢,谢谢

luckinoffice commented 6 months ago

您好,您这个解决了吗

luoweiqi7 commented 4 months ago

请问解决了吗