Ok, think of it this way:
You provide a list of indexes to index the provided tensor to obtain these values. The first dimension of indices is for each index that you will perform. Suppose a tensor is just a list of lists.
[[0]] means that you want to return one given value to index 0 in the provided tensor. Similar:
[tensor[0]]
[[0], [1]] means that you want to return two values ββat indices 0 and 1 as follows:
[tensor[0], tensor[1]]
Now, what if the tensor is more than one dimension? We do the same:
[[0, 0]] means that you want to return one value to index 0 of dimension 0, and then index 0 of dimension 1. Also:
[tensor[0][0]]
[[0, 1], [2, 3]] means that you want to return two values ββfor the provided indices and sizes. For example:
[tensor[0][1], tensor[2][3]]
Hope this makes sense. I tried using Python indexing to explain how it would look in Python to do this in a list of lists.
Max weinzierl
source share