bert4keras
bert4keras copied to clipboard
预训练 pretrain 报错,单GPU,从零训练
###预训练 pretrain 报错,单GPU,从零训练
基本信息
- 操作系统: windows
- Python版本: 3.7
- Tensorflow版本: 1.14
- Keras版本: 2.3.1
- bert4keras版本: 0.8.4
- keras还是tf.keras: tf+keras
- 预训练模型: chinese_wwm_ext_L-12_H-768_A-12
问题截图
核心代码
os.environ['TF_KERAS'] = '1'
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
输出信息
Could not find variable _AnonymousVar0. This could mean that the variable has been deleted. In TF1, it can also mean the variable is uninitialized. Debug info: container=localhost, status=Not found: Resource localhost/_AnonymousVar0/class tensorflow::Var does not exist.
自我尝试
“万般努力”之下仍然无法解决
我看不出什么原因。唯一能建议的是换linux试试。
我看不出什么原因。唯一能建议的是换linux试试。
我遇到了同样的错误,在Linux 唯一的区别是我使用的是TF.keras的模式,并且tf的版本==2.5.0 不过我猜测这个问题的原因是bert4keras的pretraining只支持tf-1.14和1.15 我使用了错误的版本
Ubuntu,同样的问题。同求