未验证 提交 e28c2c48 编写于 作者: M MRXLT 提交者: GitHub

Merge pull request #406 from guru4elephant/fix_go_client_api

refine 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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册