tensorflow-rnn-shakespeare icon indicating copy to clipboard operation
tensorflow-rnn-shakespeare copied to clipboard

export to a SavedModel

Open mapmeld opened this issue 6 years ago • 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

mapmeld avatar Apr 06 '18 21:04 mapmeld

thanks for reporting this. I am looking into it.

martin-gorner avatar May 18 '18 20:05 martin-gorner