portuguese-bert icon indicating copy to clipboard operation
portuguese-bert copied to clipboard

Failed to load tensorflow checkpoint

Open domus123 opened this issue 4 years ago • 3 comments

Hello, I'm having an issue trying to load model (base) on tensorflow 2.0

When trying to load checkpoints from different devices (e.g cpu from gpu) in tensorflow usually we use the following:

tf.compat.v1.train.import_meta_graph(metadata_path, clear_devices=True)

That makes possible for loading graphs on other devices (in this case, should be able to load on CPU).

I'm getting the following error while loading the model on tensorflow

image

The code that generate this error: image

Can you specifies the specs that were used during training? Any ideas on what's happening?

domus123 avatar Mar 09 '20 19:03 domus123

Hi domus123,

The models were trained on TPU v3-8 using TF 1.14 and the code from original BERT repository: https://github.com/google-research/bert/blob/master/run_pretraining.py.

Unfortunately I'm not a TF user so I can really help you with this problem. Did you manage to solve it?

fabiocapsouza avatar Mar 15 '20 16:03 fabiocapsouza

Any update on this? I'm having the same issue trying to convert the metadata to .pb

israellaurensi avatar Mar 24 '20 12:03 israellaurensi

Hi, wasn't able to convert here. Seem's that tensorflow can convert GPU to CPU, but I don't have knowledge about TPU's

domus123 avatar Mar 28 '20 19:03 domus123