cmd23333 / BERT-Tensorflow2.x

A tensorflow 2.x BERT implementation using League of Legends myth data(Chinese).
34 stars 9 forks source link

Key bert/embeddings/word_embeddings not found in checkpoint #3

Open xzs777 opened 2 years ago

xzs777 commented 2 years ago

老哥,我用你的代码训练出来的ckpt模型,拿到bert4keras上面跑,结果报了这个错 Key bert/embeddings/word_embeddings not found in checkpoint 请问是什么问题呢

Creazygao commented 2 years ago

我来替作者回答一下吧,不一定准确。 1.你先用model.summary打印一下每一层的信息,看看参数量对不对。如果对不上,那就是key not found的原因了。 2.没用过bert4keras,本文是tf实现的,你为什么不尝试用load_model来加载呢

老哥,我用你的代码训练出来的ckpt模型,拿到bert4keras上面跑,结果报了这个错 Key bert/embeddings/word_embeddings not found in checkpoint 请问是什么问题呢