From fcf7a010547f4f21466aa54fa207d78e0f330c38 Mon Sep 17 00:00:00 2001 From: dongdaxiang Date: Mon, 6 Apr 2020 19:39:34 +0800 Subject: [PATCH] refine serving client api.go --- go/serving_client/serving_client_api.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/go/serving_client/serving_client_api.go b/go/serving_client/serving_client_api.go index 3d4b95f2..299e4bcf 100644 --- a/go/serving_client/serving_client_api.go +++ b/go/serving_client/serving_client_api.go @@ -27,7 +27,8 @@ import ( type Tensor struct { Data []byte `json:"data"` FloatData []float32 `json:"float_data"` - IntData []int64 `json:"int_data"` + IntData []int `json:"int_data"` + Int64Data []int64 `json:"int64_data"` ElemType int `json:"elem_type"` Shape []int `json:"shape"` } @@ -116,9 +117,9 @@ func Predict(handle Handle, int_feed_map map[string][]int64, fetch []string) map for i := 0; i < len(handle.FeedAliasNames); i++ { key_i := handle.FeedAliasNames[i] var tmp Tensor - tmp.IntData = []int64{} + tmp.IntData = []int{} tmp.Shape = []int{} - tmp.IntData = int_feed_map[key_i] + tmp.Int64Data = int_feed_map[key_i] tmp.ElemType = 0 tmp.Shape = handle.FeedShapeMap[key_i] tensor_array = append(tensor_array, tmp) -- GitLab