brightmart / albert_zh

A LITE BERT FOR SELF-SUPERVISED LEARNING OF LANGUAGE REPRESENTATIONS, 海量中文预训练ALBERT模型
https://arxiv.org/pdf/1909.11942.pdf
3.93k stars 753 forks source link

用run_classifier_clue.py跑分类任务,Adam优化时,梯度出现Nan #139

Open jcfeng opened 4 years ago

jcfeng commented 4 years ago

RT,在run_classifier_clue.py中增加了自己数据集的processor ,在自己准备的两个数据集上执行正常没有问题,但是在另外的两个数据集上梯度出现NAN现象,各个数量级的学习率仍然不行,输入也没有NAN,报错是在optimizationfinetuning.py的(grads, ) = tf.clip_by_global_norm(grads, clip_norm=1.0)这行,求问各路大神