Solved by Brando_Miranda in post #5 
              
              
                Here is a solution if you want to index a tensor in an arbitrary dimension and select a set of tensors from that dimension (an example is say we want to compute some average of the first 3 layers): 
# selecting indices arbitrarily i.e. x[*,indicies,*] were * denotes that the rest of the layers are k…