well, y is needed to be [506, 256, 512], hence I want to do cat in dim=2.
Actually, I want to reshape and transpose both A and B to be as [506, 16, 256] first, then by overwritten each of them 16 times, concating them together. Finally, the achieved result should be in [506, 256, 512] (first dimension for A and second for B).