At ML Conference Berlin 2017 I gave a presentation on how to to integrate trained TensorFlow models into a Jave Server environment. The cleaned up example code for the talk is now available on github.
Currently there are three examples:
- TensorFlow SavedModel example: An IPython Notebook that illustrates the use of [
Estimators]() to properly create a
SavedModelthat can be imported to run the model, including proper preprocessing.
- Tensorflow Java Command Line example: A bare-bones Java Command Line project that shows how the basic TensorFlow-Java interop works.
- Tensorflow Apache CXF REST Server: A JAXRS REST Service in an Apache CXF Server to show how to build a REST Service in Java using Tensorflow
A detailed discussion of the code and the gotchas will follow in an in-depth series of blog posts on the topic, for now, the code examples and comments should provide a good starting point.