gpt-2-tensorflow2.0 icon indicating copy to clipboard operation
gpt-2-tensorflow2.0 copied to clipboard

Extracting the graph

Open Wonder1905 opened this issue 4 years ago • 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?

Wonder1905 avatar Mar 01 '20 15:03 Wonder1905

Hi @BattashB,

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

Thanks

akanyaani avatar Apr 14 '20 18:04 akanyaani

how about use tf.saved_model ?

ray1422 avatar Apr 15 '20 21:04 ray1422

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)

akanyaani avatar Apr 16 '20 18:04 akanyaani