tensorflow-fast-style-transfer icon indicating copy to clipboard operation
tensorflow-fast-style-transfer copied to clipboard

Android conversion

Open e-papa opened this issue 6 years ago • 0 comments

Hello, first of all thank you for your code.

I successfully used it to train a model and style some images using a GPU. Then, I would like to port the model on an Android device and try it there, but unfortunately I wasn't able to proceed.

I see the pbtxt file is missing from the directory where the checkpoints are saved so I wasn't able to proceed to freeze the graph and optimize it for mobile. I tried modifying your files to make them save the pbtxt file but I'm not sure I did it correctly. I added tf.train.write_graph(self.sess.graph_def, ".", "graph.pbtxt") just before res = saver.save(self.sess,self.save_path+'/final.ckpt') in style_transfer_trainer.py.

The saved graph file is probably way too big (~650MB), and anyway, using the summarize_graph from tensorflow I get 211 possible outputs, so unfortunately I don't know then how to freeze and optimize it.

Could you give me some advices? Thank you.

e-papa avatar Jan 11 '19 11:01 e-papa