来自github的回答,解决了我的问题,搬运一下。
https://github.com/google-research/bert/issues/934
具体方法是:
将
class AdamWeightDecayOptimizer(tf.train.Optimizer)
改为
class AdamWeightDecayOptimizer(tf.compat.v1.train.Optimizer)
有效!
来自github的回答,解决了我的问题,搬运一下。
https://github.com/google-research/bert/issues/934
具体方法是:
将
class AdamWeightDecayOptimizer(tf.train.Optimizer)
改为
class AdamWeightDecayOptimizer(tf.compat.v1.train.Optimizer)
有效!