Relative feature extractor 2

Finishing feature extractor for relative position knowledge : 
 - Fixing the loop logic done wrong in earlier version
 - Making the feature extractor can run end-to-end