Calculates the concatentation of two tensors.