3
$\begingroup$

In machine learning concatenation seems to have $2$ different meanings depending on the context.

For 2 tensors $[a, b]$ and $[c,d]$, concatenations of these $2$ tensors seems to mean either

$[a,b,c,d]$ or $[a + c, b + d]$

Which is the correct interpretation of the concatenation operation?

$\endgroup$
1
  • 1
    $\begingroup$ The Wikipedia lemma on Concatenation is quite straight-forward refer to that. (I feel for you; when authors overload existing terminology things can quickly become misleading) $\endgroup$
    – usεr11852
    May 28, 2017 at 22:15

1 Answer 1

3
$\begingroup$

The first one is correct, concatenation of tensors works exactly like string concatenation, except that on 2d or higher tensors you need to specify the dimension along which you're concatenating. Your second example is simply tensor addition.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.