get the row and col of max elements in the matrix,this is for max pooling