JayYip / m3tl

BERT for Multitask Learning
https://jayyip.github.io/m3tl/
Apache License 2.0
545 stars 125 forks source link

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

Open xingq98 opened 2 years ago

xingq98 commented 2 years ago

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

JayYip commented 2 years ago

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