我正在尝试使用来自Keras集线器()的BERT多语言作为TensorFlow模型中的一个层。在不使用分发策略的情况下训练模型效果很好。但是,当尝试通过分发策略利用Google Cloud TPU时,训练模型失败,并出现以下错误:
ValueError: Variable (<tf.Variable 'bert/embeddings/word_embeddings:0' shape=(119547, 768) dtype=float32>) was not created in the distribution strategy scope of (<tens