Assume I have a tensor with shape [3, 5, 200, 300, 3]
. How can I merge first two dim together so that I have tensor with shape [15, 200, 300, 3]
? Then I should be able to reverse merge operation and have original shape.
you can just use tf.reshape
a = tf.random_normal(shape=(3, 5, 200, 300, 3))
b = tf.reshape(a, shape=(15, 200, 300, 3))
...
c = tf.reshape(b, shape=(3, 5, 200, 300, 3))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With