你好,我尝试了你上面两种加载bert方法,都出现的了同样的错误
ValueError: Variable bert/encoder/intermediate/dense/kernel already exists, disallowed. Did you mean to set reuse=True or reuse=tf.AUTO_REUSE in VarScope? Originally defined at:
百度查到的解决方案,tf.get_variable_scope().reuse_variables()或者
tf.reset_default_graph()#复位初始图 都没解决
求解求解
BERT使用详解(实战)BERT模型,本质可以把其看做是新的word2Vec。对于现有的任务,只需把BERT的输出看做是word2vec,在其之上建立自己的模型即可了。 1,下载BERT BERT-...