title: Expand the tensor by several dimensions
body: <p>In PyTorch, given a tensor of size=[3], how to expand it by several dimensions to the size=[3,2,5,5] such that the added dimensions have the corresponding values from the original tensor. For example, making size=[3] vector=<code>[1,2,3]</code> such that the first tensor of size [2,5,5] has values <code>1</code>, the second one has all values <code>2</code>, and the third one all values <code>3</code>.</p>
  <p>In addition, how to expand the vector of size [3,2] to [3,2,5,5]?</p>
  <p>One way to do it I can think is by means of creating a vector of the same size with ones-Like and then einsum but I think there should be an easier way.</p>