I am using Python2.7, and I can't update it, and I have this line of code, which raise an error at the asterisk, and I don't know why? And how to fix!
inp = tf.random.uniform(shape=[4, 6, 2], maxval=20, dtype=tf.int32)
out = tf.math.reduce_max(inp, axis=2)
am = tf.math.argmax(out, axis=1)
o = tf.gather_nd(inp, [*enumerate(am)])
This code is about getting a 2D max Tensor from a 3D Tensor based on the maximum one value using TensorFlow 1.14. Like the image below illustrate:
