Looking at Best way to flatten a 2D tensor containing a vector in TensorFlow? I see how to flatten a 2D tensor to a 1D tensor in TensorFlow but how do I flatten a 4D Tensor to a 3D Tensor with TensorFlow functions?
For example:
import tensorflow as tf
X = tf.random_normal([n, h, w, c], mean=1, stddev=4)
Y = ???