Concatenate two dimensions inside one tensor

Hi all,

I wanna concatenate two columns inside one tensor without any loops, Any thoughts?

e.g. A=[2,4,5,5], How it becomes A=[2,20,5]?

Thanks

Hi Mohammad!

I’m not sure what you mean by “concatenate.” I’m guessing that the
values in brackets ([]) indicate the shapes of the tensors. Does:

A.reshape ([2, 20, 5])

give you what you are looking for?

If not, could you give an explicit numerical example of what your
result tensor should be?

Best.

K. Frank

Hi Frank,

Thanks for your answer.

After I posted I done it as you suggest exactly.

Thanks