1
torch.cat(x, -1)
What does the negative dimension mean here? The “-1” essentially means the index among the tensor sizes, just like simple python.
For example, say we have a tensor with a size of (w * c * h * l).
torch.cat(x, -1) will concat the tensor along l (= torch.size()[-1]).
torch.cat(x, -1) can be rewritten as torch.cat(x, 3).