Add weights to .pb file exported by TensorFlow : <p>My project uses Python to train a MLP on TensorFlow and then I export the graph and the weights in that way:</p>

<pre><code>tf.train.write_graph(sess.graph_def, "./", "inp.txt", True) 
saver.save(sess, 'variables/model.ckpt', global_step=1)
</code></pre>

<p>Now, although it is fine to use both files to import it back to Python it seems impossible to use it for Android or C++ since it cannot inport the checkpoint .ckpt.</p>

<p>Right now, I'm using the script <code>freeze_graph.py</code> provided by google to join both files into one by doing:</p>

<pre><code>bazel-bin/tensorflow/python/tools/freeze_graph --input_graph=inp.txt --input_checkpoint=variables/model.ckpt-1 --output_graph=newoutput.pb --output_node_names=output
</code></pre>

<p>My question is, is there a way to use another function instead of <code>tf.train.write_graph</code> to export it with the weights included?</p>
