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

ModuleAttributeError: 'Embedding' object has no attribute 'weights' #104

Open
xingq98 opened this issue May 17, 2022 · 1 comment
Open

Comments

@xingq98
Copy link

xingq98 commented May 17, 2022

我把模型换成Bertweet之后训练时候报错:AttributeError: 'Embedding' object has no attribute 'weights'
报错的代码是在base.py里的self.embedding_dim = tf.shape(self.embedding_layer.weights[0])[1],请问是因为这个多任务训练不能使用Bertweet吗?

@xingq98 xingq98 changed the title why is mean acc > 1 how to change classification model and tune the model hyperparameters? May 17, 2022
@xingq98 xingq98 changed the title how to change classification model and tune the model hyperparameters? how to tune the model hyperparameters? May 17, 2022
@xingq98 xingq98 changed the title how to tune the model hyperparameters? how to change the model May 18, 2022
@xingq98 xingq98 changed the title how to change the model ModuleAttributeError: 'Embedding' object has no attribute 'weights' May 19, 2022
@JayYip
Copy link
Owner

JayYip commented Jun 7, 2022

你好像是用了错误的transformer_model_loading. 需要是TFXXXX

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