My Code :
data = [0, 2]
f = numpy.array([[[1, 2], [3, 4]],
[[4, 5], [7, 5]],
[[6, 3], [7, 9]]])
l = []
for i in data :
l.append(f[i])
return np.maximum.reduce(l)
Output :
[[6, 3], [7, 9]] Element wise maximum between f[0] and f[2] as data is 0 and 2
All i need is to implement the same code in tensorflow format using tf.while_loop and any other tensorflow function