TensorFlow Serving C++ API Documentation
regression_service.h
1 /* Copyright 2017 Google Inc. All Rights Reserved.
2 
3 Licensed under the Apache License, Version 2.0 (the "License");
4 you may not use this file except in compliance with the License.
5 You may obtain a copy of the License at
6 
7  http://www.apache.org/licenses/LICENSE-2.0
8 
9 Unless required by applicable law or agreed to in writing, software
10 distributed under the License is distributed on an "AS IS" BASIS,
11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 See the License for the specific language governing permissions and
13 limitations under the License.
14 ==============================================================================*/
15 
16 #ifndef TENSORFLOW_SERVING_SERVABLES_TENSORFLOW_REGRESSION_SERVICE_H_
17 #define TENSORFLOW_SERVING_SERVABLES_TENSORFLOW_REGRESSION_SERVICE_H_
18 
19 #include "tensorflow/core/lib/core/status.h"
20 #include "tensorflow/core/protobuf/config.pb.h"
21 #include "tensorflow_serving/apis/regression.pb.h"
22 #include "tensorflow_serving/model_servers/server_core.h"
23 
24 namespace tensorflow {
25 namespace serving {
26 
27 // Utility methods for implementation of
28 // tensorflow_serving/apis/regression-service.proto.
30  public:
31  static Status Regress(const RunOptions& run_options, ServerCore* core,
32  const thread::ThreadPoolOptions& thread_pool_options,
33  const RegressionRequest& request,
34  RegressionResponse* response);
35 
36  // Like Regress(), but uses 'model_spec' instead of the one embedded in
37  // 'request'.
38  static Status RegressWithModelSpec(
39  const RunOptions& run_options, ServerCore* core,
40  const thread::ThreadPoolOptions& thread_pool_options,
41  const ModelSpec& model_spec, const RegressionRequest& request,
42  RegressionResponse* response);
43 };
44 
45 } // namespace serving
46 } // namespace tensorflow
47 
48 #endif // TENSORFLOW_SERVING_SERVABLES_TENSORFLOW_REGRESSION_SERVICE_H_