When two tensors are added together, for example,
c = a + b
the function tensor.__add__
is invoked to really “add” two tensors.
When a tensor is sliced on a given axis, which function is invoked?
# slice on axis=1
b = a[:, 1:2]
I searched for *slice
on the pytorch reference documentation but found nothing.