我想要转换每一行,这样我就可以将其输入到预先训练的Bert模型中。label, text], [tf.float32, tf.string]))
"""Decodes a row to a TensorFlowtf_example = tf.train.Example(features=tf.train.Features(feature=features))
return tf_example 这与:tensorflow
我想用Universal Sentence Encoder on TensorFlow Hub嵌入来计算Word Mover's Distance。据我所知,有人写了一个Bert to token embeddings based on pytorch,但它没有推广到tf-hub上的其他模型。是否有其他方法可以将tf-hub上的预训练模型转换为spaCy格式或word2vec格式?