Closed jnclt closed 4 years ago
Thanks @jnclt for reporting.
We should add more documents about integrating preprocessing
methods. Here is the example code to export the TensorFlow SavedModel with preprocessing function in graph.
Here is the basic way to do that.
preprocess_function_string = marshal.dumps(preprocess.func_code)
tf.add_to_collection("preprocess_function", preprocess_function_string)
postprocess_function_string = marshal.dumps(postprocess.func_code)
tf.add_to_collection("postprocess_function", postprocess_function_string)
That helped, got it working. Thanks a lot!
How can I export a tensorflow model with preprocessing_function.marshal? While other frameworks (e.g. xgboost) expect files with pre- & postprocessing code next to the models, tensorflow_inference_service.py expects them to be included in metagraph.collection_def. How can this be achieved? (I want to add standard scaling) Jan