Help!When I learn your mnist_saved_model.py, I'm confused by the SignatureDef of Classification and Predict. I just wonder what's the difference between them?
The SignatureDef of Classification is used for the Classify RPC API (https://github.com/tensorflow/serving/blob/master/tensorflow_serving/apis/prediction_service.proto#L17), and the SignatureDef of Predict is used for the Predict RPC API (https://github.com/tensorflow/serving/blob/master/tensorflow_serving/apis/prediction_service.proto#L23).
The Classify API is higher-level and more specific than the Predict API. Classify accepts tensorflow.serving.Input (which wraps a list of tf.Examples) as input and produces classes and scores as output. It is used for classification problems. Predict, on the other than, accepts tensors as input and outputs tensors. It can be used for regression, classification and other types of inference problems.
Thank you!Your answer helped me
Most helpful comment
The SignatureDef of Classification is used for the Classify RPC API (https://github.com/tensorflow/serving/blob/master/tensorflow_serving/apis/prediction_service.proto#L17), and the SignatureDef of Predict is used for the Predict RPC API (https://github.com/tensorflow/serving/blob/master/tensorflow_serving/apis/prediction_service.proto#L23).
The Classify API is higher-level and more specific than the Predict API. Classify accepts tensorflow.serving.Input (which wraps a list of tf.Examples) as input and produces classes and scores as output. It is used for classification problems. Predict, on the other than, accepts tensors as input and outputs tensors. It can be used for regression, classification and other types of inference problems.