Solved by albanD in post #2 
              
              
                You can see in the exception " Assertion srcIndex < srcSelectDimSize failed." This means that you tried to index a Tensor with an index that is larger than it’s size. 
You want to check in more details all your indices and make sure they are correct. 
Note that to get a stack trace that points exact…