Skip to content

Commit 2feda47

Browse files
author
hhsecond
committed
go client
1 parent 298d51d commit 2feda47

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

go_client/tensorflow_imagenet.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ func main() {
6363

6464
model, _ := ioutil.ReadFile(modelPath)
6565
script, _ := ioutil.ReadFile(scriptPath)
66-
client.Do("AI.MODELSET", "imagenet_model", "TF", "CPU", "INPUTS", "images", "OUTPUTS", "output", model)
67-
client.Do("AI.SCRIPTSET", "imagenet_script", "CPU", script)
66+
client.Do("AI.MODELSET", "imagenet_model", "TF", "CPU", "INPUTS", "images", "OUTPUTS", "output", "BLOB", model)
67+
client.Do("AI.SCRIPTSET", "imagenet_script", "CPU", "SOURCE", script)
6868
client.Do("AI.TENSORSET", "image", "UINT8", rect.Max.X, rect.Max.Y, 3, "BLOB", imgbuf.Bytes())
6969

7070
client.Do("AI.SCRIPTRUN", "imagenet_script", "pre_process_3ch", "INPUTS", "image", "OUTPUTS", "temp1")

go_client/torch_charrnn.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func main() {
3434
hidden := new(bytes.Buffer)
3535
binary.Write(hidden, binary.BigEndian, make([]float32, arraylen)) // Array is zero valued by default
3636

37-
client.Do("AI.MODELSET", "charRnn", "TORCH", "CPU", model)
37+
client.Do("AI.MODELSET", "charRnn", "TORCH", "CPU", "BLOB", model)
3838
client.Do("AI.TENSORSET", "hidden", "FLOAT", n_layers, batch_size, hidden_size, "BLOB", hidden.Bytes())
3939
client.Do("AI.TENSORSET", "prime", "INT64", 1, "VALUES", 6)
4040
client.Do("AI.MODELRUN", "charRnn", "INPUTS", "prime", "hidden", "OUTPUTS", "out")

go_client/torch_imagenet.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ func main() {
6363

6464
model, _ := ioutil.ReadFile(modelPath)
6565
script, _ := ioutil.ReadFile(scriptPath)
66-
client.Do("AI.MODELSET", "imagenet_model", "TORCH", "CPU", model)
67-
client.Do("AI.SCRIPTSET", "imagenet_script", "CPU", script)
66+
client.Do("AI.MODELSET", "imagenet_model", "TORCH", "CPU", "BLOB", model)
67+
client.Do("AI.SCRIPTSET", "imagenet_script", "CPU", "SOURCE", script)
6868
client.Do("AI.TENSORSET", "image", "UINT8", rect.Max.X, rect.Max.Y, 3, "BLOB", imgbuf.Bytes())
6969

7070
client.Do("AI.SCRIPTRUN", "imagenet_script", "pre_process_3ch", "INPUTS", "image", "OUTPUTS", "temp1")

0 commit comments

Comments
 (0)