Could you provide an example?
At the moment, I have index vector i, such as follows;
i = torch.tensor([[1,2,3],[0,1,2]])

The value is True on the location of i in matrix of size 10x10.
However, the problem is that in each batch the size of i is different.
For example, in one batch, it is 2x3. Another maybe 2x5.
Could you recommend a proper tools for this ?