26hzhang / neural_sequence_labeling

A TensorFlow implementation of Neural Sequence Labeling model, which is able to tackle sequence labeling tasks such as POS Tagging, Chunking, NER, Punctuation Restoration and etc.
MIT License
234 stars 47 forks source link

saving .pb format #9

Open NewEnglandML opened 5 years ago

NewEnglandML commented 5 years ago

Hi, I wonder to know how we can save the model with .pb extensions for serving. Thanks

tringn commented 5 years ago

@NewEnglandML, Have you figured it out?

tringn commented 5 years ago

@NewEnglandML, I did freezing checkpoint to .pb file. You can refer the code for freezing here: https://blog.metaflow.fr/tensorflow-how-to-freeze-a-model-and-serve-it-with-a-python-api-d4f3596b3adc The output_node_names is: project/dense/BiasAdd You need to add the viterbi decode after the output node for the predictions.