似乎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)