martin-gorner/tensorflow-rnn-shakespeare

export to a SavedModel

Opened this issue · 1 comments

Following up on our Twitter chat: I want to save a trained model from my text as a TensorFlow SavedModel. It'd be especially cool if that SavedModel can be accepted by tfjs-converter and run in the browser.

How I tried to export the model:

builder = tf.saved_model.builder.SavedModelBuilder('./sample')
with tf.Session() as sess:
   # current code
   ...
   ...
   builder.add_meta_graph_and_variables(sess, [tf.saved_model.tag_constants.TRAINING])
   builder.save()

I was able to see and export one tag-set (train) but it came with no SignatureDefs / MetaGraphDef tags, which is what I'm supposed to select in this process: https://github.com/tensorflow/tfjs-converter

thanks for reporting this. I am looking into it.