How about if I do the following operation to replicate spatially and concatenate class information.
tensor_A = tensor_A.view(tensor_A .size(0), tensor_A.size(1), 1, 1)
tensor_A = tensor_A.repeat(1, 1, tensor_B.size(2), tensor_B.size(3))
concat = torch.cat([tensor_A , tensor_B], dim=1)

Which one of the two solutions (the one you proposed and this) seems more logical considering that I want to be computationally efficient and I want to concatenate the extracted class information (tensor_A) into tensor_B.