Convert pytorch checkpoint to tensorflow2

Reason is the light and the light of life.

Jerry Su Nov 19, 2020 1 mins

https://github.com/huggingface/transformers/issues/6124

from transformers import TFBertModel
model = TFBertModel.from_pretrained("./rubert-base-cased-pt", from_pt=True)

model.save("./rubert-base-cased") # this adds a TF model file (tf_model.h5) to your directory

Read more:

Related posts: