2017-07-09 31 views

回答

0

在張量流中,您需要爲兩個模型明確指定the computational graph

# build two separate graphs `g1` and `g2` 

tf.reset_default_graph() 
with tf.Session(graph=g1) as session: 
    result = sess.run(detect, feed_dict={x: test_x}) 
    print(result) 

tf.reset_default_graph() 
with tf.Session(graph=g2) as session: 
    result = sess.run(recognize, feed_dict={x: test_x}) 
    print(result) 

在一個應用程序中構建多個圖形時還有一些注意事項,請參見this question

相關問題