4

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?

ᴀʀᴍᴀɴ
  • 4,443
  • 8
  • 37
  • 57
Kay Jersch
  • 277
  • 3
  • 13
  • 1
    Possible duplicate of [How can I change the shape of a variable in TensorFlow?](http://stackoverflow.com/questions/33654754/how-can-i-change-the-shape-of-a-variable-in-tensorflow) – Alex Reynolds Jan 28 '17 at 11:08

1 Answers1

5

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

KT12
  • 549
  • 11
  • 24
Florentin Hennecker
  • 1,974
  • 23
  • 37