akanyaani/gpt-2-tensorflow2.0

Extracting the graph

Wonder1905 opened this issue · 3 comments

Since it's tf2, it's much harder for me to extract the forward graph (also the backward), can you help us with that?

Hi @BattashB,

Sorry for my late reply, Can you elaborate the issue?

Thanks

how about use tf.saved_model ?

Hi @ray1422

#you can run this it will give .PB format of model.

tf.saved_model.save(gpt2_model, model_path)
#Run this line if you get some signature related error.

input_signature = #Your input tesnor signature
model._set_inputs(input_signature)