Based on the error message it seems the error is raised in this line of code 88.
However, it seems there is no tensor involved in these operations.
Generally you would get this error, if you are trying to index a 4th dimension for a 3-dimensional tensor:
x = torch.randn(1, 2, 3)
x[0, 0, 0, 0]
> IndexError: too many indices for tensor of dimension 3