Kay Jersch
Kay Jersch

Reputation: 297

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?

Upvotes: 4

Views: 5479

Answers (1)

Florentin Hennecker
Florentin Hennecker

Reputation: 2174

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

Upvotes: 5

Related Questions