For tensorflow functions that require a shape argument, how can we feed a dynamic shape as one of the input argument(s)?
For instance, let's say I have a placeholder
x = tf.placeholder(tf.float32, [None, 3])
And now I want to create a 1D random tensor with the same shape as the first dimension of x.
r = tf.random_uniform([x.get_shape()[0]])
This will not work since x.get_shape()[0] will return a static shape "None". Is there a a way to assign a dynamic shape to r based on the dynamic shape of x?