I need to create a tensor by calling some function fn over two other tensors and indices in a loop as follows:
tensor = [[fn(tensor1, tensor2, i, j) for i in range(3)] for j in range(4)]
Not sure how to approach this problem. Use tf.map_fn somehow?
fn. You can also trytf.while_loopbesidestf.map_fn.