如何在Graphdef中收集

时间:2019-04-02 22:23:38

标签: tensorflow

似乎TF都支持Gather和GatherV2,但是我无法使用TF 1.8+在GraphDef中获取Gather,如何在TF最新版本(如1.13)中的graphdef中获取Gather?

indices = tf.constant([0, 1, 1])
x = tf.constant([[1, 2, 3],
                 [4, 5, 6],
                 [7, 8, 9]])
result = tf.gather(x, indices, axis=1)
with tf.Session() as sess:
    out = sess.run(result)
    print(out)
    print(sess.graph_def)

0 个答案:

没有答案
相关问题