You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

ms_service.proto 1.5 kB

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /**
  2. * Copyright 2019 Huawei Technologies Co., Ltd
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. // ms_service.proto
  17. syntax = "proto3";
  18. package ms_serving;
  19. service MSService {
  20. rpc Predict(PredictRequest) returns (PredictReply) {}
  21. rpc Test(PredictRequest) returns (PredictReply) {}
  22. }
  23. message PredictRequest {
  24. repeated Tensor data = 1;
  25. repeated Images images = 2;
  26. }
  27. message PredictReply {
  28. repeated Tensor result = 1;
  29. }
  30. enum DataType {
  31. MS_UNKNOWN = 0;
  32. MS_BOOL = 1;
  33. MS_INT8 = 2;
  34. MS_UINT8 = 3;
  35. MS_INT16 = 4;
  36. MS_UINT16 = 5;
  37. MS_INT32 = 6;
  38. MS_UINT32 = 7;
  39. MS_INT64 = 8;
  40. MS_UINT64 = 9;
  41. MS_FLOAT16 = 10;
  42. MS_FLOAT32 = 11;
  43. MS_FLOAT64 = 12;
  44. }
  45. message TensorShape {
  46. repeated int64 dims = 1;
  47. };
  48. message Tensor {
  49. // tensor shape info
  50. TensorShape tensor_shape = 1;
  51. // tensor content data type
  52. DataType tensor_type = 2;
  53. // tensor data
  54. bytes data = 3;
  55. }
  56. message Images{
  57. repeated bytes images = 1;
  58. uint32 input_index = 2;
  59. }