Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tensorflow: How to convert a rank 1 tensor into a rank 2 tensor

I'm trying to make a simple neural network and I have a simple question: How do I convert a tensor which is rank 1 to a tensor which is rank 2?

like image 390
Kay Jersch Avatar asked Oct 19 '25 04:10

Kay Jersch


1 Answers

You might be looking for tf.expand_dims() https://www.tensorflow.org/api_docs/python/tf/expand_dims

like image 120
Florentin Hennecker Avatar answered Oct 20 '25 18:10

Florentin Hennecker