Added maxSelDim at matrix
Merge branch 'master' into maxpooling