Suppose I have two tensor variables each of size 2x4:
v1 = tf.logical_and(a1, b1)
v2 = tf.logical_and(a2, b2)
Instead, I want to store these in an array called v which is of size 2x2x4. How do I do this in Tensorflow? The idea would be something like this:
for i in range(2):
v[i] = tf.logical_and(a[i],b[i])
How do I initialize v? I tried initializing v as a numpy array which did not work. I also tried initializing it as a tensorflow variable, ie. tf.Variable(tf.zeros([2])) but that does not work either.
Note, a and b are dynamic inputs, ie. they are tf.placeholder variables.