tobegit3hub / simple_tensorflow_serving

Generic and easy-to-use serving service for machine learning models
https://stfs.readthedocs.io
Apache License 2.0
757 stars 195 forks source link

A little bit more documentation, what are keys? #56

Closed hellsan631 closed 3 years ago

hellsan631 commented 5 years ago

Sorry for the noob question, but I'm new to the world of neural networks.

I have been doing some digging, but am unable to find out what the significance of keys within the input data.

input_data = {
  ...
  "data": {
      "keys": [[11.0], [2.0]],
      "features": [[1, 1, 1, 1, 1, 1, 1, 1, 1],
                   [1, 1, 1, 1, 1, 1, 1, 1, 1]]
  }
}

As far as I'm aware, features are the input for the neural network, in the above case, a 2d tensor.

What is the significance of keys and how do they correlate to the input to the neural network?

tobegit3hub commented 5 years ago

The keys in this example is related to your model signature. That means you can change the keys of requests for your own TensorFlow models and this json only works for the example TensorFlow models in this project.