背景
使用官方的bert模型https://github.com/google-research/bert作文本分类时(运行run_classifier.py函数),遇到的一些问题记录
问题记录
- 官方模型要求的版本是
tensorflow >= 1.11.0,现在安装的是2.15.0,2.x版和1.x版之间有一些函数变了 - 训练时,一部分问题参考https://zhuanlan.zhihu.com/p/390004994
- 预测时,问题参考Bert模型预测时出现的问题:ValueError: Assignment map with scope only name bert/embeddings/layer_normalizations
- 使用自己数据集时,需要新建一个数据类,实现里面的输入文本和标签部分怎么取