Skip to content
This repository was archived by the owner on Nov 25, 2020. It is now read-only.

Conversation

ggaaooppeenngg
Copy link

save graph def

import tensorflow as tf
with tf.Graph().as_default() as g:
    a = tf.placeholder("double", name="a", shape=[2,2])
    b = tf.placeholder("double", name="b", shape=[2,2])
    y = tf.multiply(a, b)
    tf.train.write_graph(g, "./", "ma_plus_mb.pb", as_text=False)

run server

 ./graphpipe-tf --model ma_plus_mb.pb

test api

 curl -d '{"a":[[1,2],[1,2]],"b":[[1,2],[1,2]]}' "http://localhost:9000/rest"

ggaaooppeenngg and others added 4 commits January 14, 2019 23:38
Signed-off-by: Peng Gao <peng.gao.dut@gmail.com>
Signed-off-by: Peng Gao <peng.gao.dut@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants