code: public static void scaleByMax(INDArray toScale) {
          INDArray scale = toScale.max(1);
          for (int i = 0; i < toScale.rows(); i++) {
              double scaleBy = scale.getDouble(i);
              toScale.putRow(i, toScale.getRow(i).divi(scaleBy));
          }
      }
docs: Divides each row by its max
  
  @param toScale the matrix to divide by its row maxes