So, I\'ve been struggling to understand what the main task of a serving_input_fn() is when a trained model is exported in Tensorflow for serving purposes. There are some exa
If you are writing a custom Estimator, the serving input function remains the same as above. That is still the input to predict().
What changes is that you have to write a predictions dictionary for the output and specify it when creating an EstimatorSpec
Take a look at the serving input function in model.py and the sequence_regressor in task.py in this directory:
https://github.com/GoogleCloudPlatform/training-data-analyst/tree/master/courses/machine_learning/deepdive/09_sequence/sinemodel/trainer
That is an example of a custom regression model that takes N inputs and has one output.