2
Mit Blick auf Best way to flatten a 2D tensor containing a vector in TensorFlow? Ich sehe, wie man einen 2D Tensor zu einem 1D Tensor in TensorFlow glätten, aber wie mache ich eine 4D flach Tensor zu einem 3D Tensor mit TensorFlow Funktionen?Resize Tensor von Form (n, h, w, c) zu (n, h * w, c)
Zum Beispiel:
import tensorflow as tf
X = tf.random_normal([n, h, w, c], mean=1, stddev=4)
Y = ???