As per the error trace, you cannot index using a tensor of size greater than 1. In other words, you cannot use a multidimensional array to index out elements. It is not very clear to me as to what you are trying to do. Can you print  out the for loop that you used? That would give a better idea of what you want to achieve.