Solved by MariosOreo in post #2 
              
              
                Hello, 
There are two points in your snippet do not make sense to me. 

I have got that you want to extract features from intermediate layers, I think the first index [0] already represent the layer index, so what does the [layer] do for? 

Here the optimizer will only update the input, it seems wei…