JayYip / m3tl

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

Unused attribute in object (root).body.bert.embedding_layer.token_type_embeddings: ['VARIABLE_VALUE'] #111

Closed EdwardChan5000 closed 2 years ago

EdwardChan5000 commented 2 years ago

预测值不固定,发现embedding层没有加载问题。(好像之前也有遇到过?后贴图)

查询google没有解决方案。劳烦大佬帮忙看看。(我的版本太老了?)

m3tl=0.3.2 transformers=4.1.1 python=3.8.5 tensorflow=2.4.1

image

ps: WARNING:tensorflow:Unused attribute in object (root).body.bert.embedding_layer.token_type_embeddings: ['VARIABLE_VALUE'] WARNING:tensorflow:Unused attribute in object (root).body.bert.embedding_layer.embeddings: ['VARIABLE_VALUE'] WARNING:tensorflow:A checkpoint was restored (e.g. tf.train.Checkpoint.restore or tf.keras.Model.load_weights) but not all checkpointed values were used. See above for specific issues. Use expect_partial() on the load status object, e.g. tf.train.Checkpoint.restore(...).expect_partial(), to silence these warnings, or use assert_consumed() to make the check explicit. See https://www.tensorflow.org/guide/checkpoint#loading_mechanics for details.

EdwardChan5000 commented 2 years ago

solved by update transformers to 4.6.1