Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

what's the difference between Classification API and Predict API? #599

Closed
vollerain opened this issue Sep 14, 2017 · 2 comments
Closed

Comments

@vollerain
Copy link

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?

@lilao
Copy link
Contributor

lilao commented Sep 18, 2017

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.

@vollerain
Copy link
Author

Thank you!Your answer helped me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants