import tensorflow as tf
value = [[[1,2,3],[11,22,33]],[[4,5,6],[44,55,66]]]
init = tf.constant_initializer(value)
input = tf.get_variable('input', shape=[2,2,3], initializer=init)
value = [[[0,1],[1,0]]]
init = tf.constant_initializer(value)
index = tf.get_variable('index', shape=[2,1,2], initializer=init, dtype=tf.int32)
value = [[0,1],[1,0]]
init = tf.constant_initializer(value)
index2 = tf.get_variable('index2', shape=[2,2], initializer=init, dtype=tf.int32)
value = [0,1]
init = tf.constant_initializer(value)
index3 = tf.get_variable('index3', shape=[2], initializer=init, dtype=tf.int32)
value = [0,1,1]
init = tf.constant_initializer(value)
index4 = tf.get_variable('index4', shape=[3], initializer=init, dtype=tf.int32)
result = tf.gather_nd(input,index)
result2 = tf.gat