Solved by ptrblck in post #2 
              
              
                As the error states the shape of the input and indices tensor have to match, which doesn’t seem to be the case in your script. Check the shapes via print(input.shape) and print(indices.shape) and make sure they are equal.