I am new to tensorflow 1.14. Say I have an n * dim tf array: X_tf. I also have dim different numbers of f (as each of them imposes different a and b):
def f(x, a, b):
return x + a + b
I would like to do the following mapping:
result = [f_0(X_tf[:, 0], a_0, b_0), f_1(X_tf[:, 1], a_1, b_1), ..., f_n(X_tf[:, n], a_n, b_n)]
I see tf.map_fn is capable of doing similar things but the difference is I need to apply for every column of X_tf. While I am also seeking a way to avoid using tf.while_loop and I have to keep these within tf framework.
Any hint on this?