Examples of addi()


Examples of com.numb3r3.common.math.Matrix.addi()

    }

    @Override
    public Matrix add(Matrix other) {
        Matrix dump = this.dup();
        dump.addi(other);
        return dump;
    }

    @Override
    public void addi(double scale) {
View Full Code Here

Examples of com.numb3r3.common.math.Matrix.addi()

    }

    @Override
    public Matrix add(double scale) {
        Matrix dump = this.dup();
        dump.addi(scale);
        return dump;
    }

    @Override
    public void subi(Matrix other) {
View Full Code Here

Examples of org.jblas.DoubleMatrix.addi()

    for(int i = 0; i < curr_pbparam.w.length; i++) {
      DoubleMatrix delta_wi = l_bias[i + 1].transpose().mmul(activation[i]).divi(nbr_sample);
      if(config.isUseRegularization()) {
        //for bp, only use L2
        if(0 != config.getLamada2()) {
            delta_wi.addi(curr_pbparam.w[i].mul(config.getLamada2()));
        }
      }
      curr_pbparam.w[i].subi(delta_wi.muli(config.getLearningRate()));
    }
    for(int i = 0; i < curr_pbparam.b.length; i++) {
View Full Code Here

Examples of org.jblas.DoubleMatrix.addi()

      for(int i = 0; i < my_bpparam.w.length; i++) {
        DoubleMatrix delta_wi = l_bias[i + 1].transpose().mmul(activation[i]).divi(nbr_samples);
        if(my_config.isUseRegularization()) {
          //for bp, only use L2
          if(0 != my_config.getLamada2()) {
              delta_wi.addi(my_bpparam.w[i].mul(my_config.getLamada2()));
          }
        }
        for(int row = 0; row < delta_wi.rows; row++) {
          for(int col = 0; col < delta_wi.columns; col++) {
            arg[idx++] = -delta_wi.get(row, col);
View Full Code Here

Examples of org.jblas.DoubleMatrix.addi()

        delta_b = delta_b.columnSums().divi(nbr_samples);
        delta_w.divi(nbr_samples);
       
        if (config.isUseRegularization()) {
            if (0 != config.getLamada1()) {
                delta_w.addi(MatrixFunctions.signum(curr_w).mmuli(config.getLamada1()));
                delta_b.addi(MatrixFunctions.signum(curr_b).transpose().mmuli(config.getLamada1()));
            }
            if (0 != config.getLamada2()) {
                delta_w.addi(curr_w.mmul(config.getLamada2()));
                delta_b.addi(curr_b.transpose().mmul(config.getLamada2()));
View Full Code Here

Examples of org.jblas.DoubleMatrix.addi()

            if (0 != config.getLamada1()) {
                delta_w.addi(MatrixFunctions.signum(curr_w).mmuli(config.getLamada1()));
                delta_b.addi(MatrixFunctions.signum(curr_b).transpose().mmuli(config.getLamada1()));
            }
            if (0 != config.getLamada2()) {
                delta_w.addi(curr_w.mmul(config.getLamada2()));
                delta_b.addi(curr_b.transpose().mmul(config.getLamada2()));
            }
        }
       
        curr_w.addi(delta_w.muli(config.getLearningRate()));
View Full Code Here

Examples of org.jblas.DoubleMatrix.addi()

    for(int i = 0; i < curr_pbparam.w.length; i++) {
      DoubleMatrix delta_wi = l_bias[i + 1].transpose().mmul(activation[i]).divi(nbr_sample);
      if(config.isUseRegularization()) {
        //for bp, only use L2
        if(0 != config.getLamada2()) {
            delta_wi.addi(curr_pbparam.w[i].mul(config.getLamada2()));
        }
      }
      curr_pbparam.w[i].subi(delta_wi.muli(config.getLearningRate()));
    }
    for(int i = 0; i < curr_pbparam.b.length; i++) {
View Full Code Here

Examples of org.jblas.DoubleMatrix.addi()

            delta_b = delta_b.columnSums().divi(nbr_samples);
            delta_w.divi(nbr_samples);

            if (my_config.isUseRegularization()) {
                if (0 != my_config.getLamada1()) {
                    delta_w.addi(MatrixFunctions.signum(my_w).mmuli(my_config.getLamada1()));
                    delta_b.addi(MatrixFunctions.signum(my_b).transpose().mmuli(my_config.getLamada1()));
                }
                if (0 != my_config.getLamada2()) {
                    delta_w.addi(my_w.mmul(my_config.getLamada2()));
                    delta_b.addi(my_b.transpose().mmul(my_config.getLamada2()));
View Full Code Here

Examples of org.jblas.DoubleMatrix.addi()

                if (0 != my_config.getLamada1()) {
                    delta_w.addi(MatrixFunctions.signum(my_w).mmuli(my_config.getLamada1()));
                    delta_b.addi(MatrixFunctions.signum(my_b).transpose().mmuli(my_config.getLamada1()));
                }
                if (0 != my_config.getLamada2()) {
                    delta_w.addi(my_w.mmul(my_config.getLamada2()));
                    delta_b.addi(my_b.transpose().mmul(my_config.getLamada2()));
                }
            }

            int idx = 0;
View Full Code Here

Examples of org.jblas.DoubleMatrix.addi()

      for(int i = 0; i < my_bpparam.w.length; i++) {
        DoubleMatrix delta_wi = l_bias[i + 1].transpose().mmul(activation[i]).divi(nbr_samples);
        if(my_config.isUseRegularization()) {
          //for bp, only use L2
          if(0 != my_config.getLamada2()) {
              delta_wi.addi(my_bpparam.w[i].mul(my_config.getLamada2()));
          }
        }
        for(int row = 0; row < delta_wi.rows; row++) {
          for(int col = 0; col < delta_wi.columns; col++) {
            arg[idx++] = -delta_wi.get(row, col);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.