Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dengxingzhi opened this issue Nov 23, 2023 · 1 comment
Open

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

dengxingzhi opened this issue Nov 23, 2023 · 1 comment

Comments

@dengxingzhi
Copy link

您好,在我使用"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
Copy link

您好,您这个解决了吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants