I got error for dimension of tensor

It would depend on your idea what the concatenation would mean.
Right now you are using a 2D tensor in the shape [2048, 20] and are trying to concatenate a single value to it, which won’t work.
Think about this use case as having an image and trying to “concatenate” a single value (pixel) to it.
You could of course repeat the single pixel value and create a row, column, or entire image plane, and concatenate these tensors, but I don’t know what your overall use case expects.