Examples of mmul()


Examples of org.jblas.DoubleMatrix.mmul()

    double margin = weightsVector.dot(featuresVector);

    double labelAsDouble = label ? 1.0 : -1.0;
    if (margin * labelAsDouble < 1) {

      double confidence = featuresVector.dot(featuresVector.mmul(varianceMatrix));

      double beta = 1 / (confidence + this.r);
      double alpha = Math.max(0, beta * (1 - labelAsDouble * margin));
      DoubleMatrix delta = featuresVector.mmul(varianceMatrix).mul(alpha * labelAsDouble);

 
View Full Code Here

Examples of org.jblas.DoubleMatrix.mmul()

      for (int j = 0; j < ret.columns; j++) {
        ret.put(i, j, MathUtil.binomial(1, ret.get(i, j)));
      }
    }
       
        ret = ret.mmul(hlparam.w).addiRowVector(hlparam.vbias);
        MathUtil.sigmod(ret);
        return ret;
    }
   
  @Override
View Full Code Here

Examples of org.jblas.DoubleMatrix.mmul()

  @Override
  public DoubleMatrix reconstruct(DoubleMatrix input) {
    DoubleMatrix ret = input.mmul(hlparam.w.transpose()).addiRowVector(hlparam.hbias);
        MathUtil.sigmod(ret);
        ret = ret.mmul(hlparam.w).addiRowVector(hlparam.vbias);
        MathUtil.sigmod(ret);
        return ret;
  }

  @Override
View Full Code Here

Examples of org.jblas.DoubleMatrix.mmul()

     * @return Output layer output matrix
     */
  public final DoubleMatrix sigmod_output(DoubleMatrix input) {
    DoubleMatrix output = input;
    for(int i = 0; i < bpparam.w.length; i++) {
      output = output.mmul(bpparam.w[i].transpose()).addiRowVector(bpparam.b[i]);
      MathUtil.sigmod(output);
    }
    return output;
  }
 
View Full Code Here

Examples of org.jblas.DoubleMatrix.mmul()

        p = DoubleMatrix.concatHorizontally(DoubleMatrix.concatHorizontally(a, b),DoubleMatrix.concatHorizontally(c, d));
        q = DoubleMatrix.concatVertically(DoubleMatrix.concatHorizontally(a, b),DoubleMatrix.concatHorizontally(c, d));

        DoubleMatrix x = p.transpose().mmul(p);
        x = x.mmul(x);
        x = x.mmul(x);
        v.data[i]=x.diag().sum();

        x = q.transpose().mmul(q);
        x = x.mmul(x);
View Full Code Here

Examples of org.jblas.DoubleMatrix.mmul()

        p = DoubleMatrix.concatHorizontally(DoubleMatrix.concatHorizontally(a, b),DoubleMatrix.concatHorizontally(c, d));
        q = DoubleMatrix.concatVertically(DoubleMatrix.concatHorizontally(a, b),DoubleMatrix.concatHorizontally(c, d));

        DoubleMatrix x = p.transpose().mmul(p);
        x = x.mmul(x);
        x = x.mmul(x);
        v.data[i]=x.diag().sum();

        x = q.transpose().mmul(q);
        x = x.mmul(x);
        x = x.mmul(x);
View Full Code Here

Examples of org.jblas.DoubleMatrix.mmul()

        x = x.mmul(x);
        x = x.mmul(x);
        v.data[i]=x.diag().sum();

        x = q.transpose().mmul(q);
        x = x.mmul(x);
        x = x.mmul(x);
        w.data[i]=x.diag().sum();

      }
View Full Code Here

Examples of org.jblas.DoubleMatrix.mmul()

        x = x.mmul(x);
        v.data[i]=x.diag().sum();

        x = q.transpose().mmul(q);
        x = x.mmul(x);
        x = x.mmul(x);
        w.data[i]=x.diag().sum();

      }

      List<Double> vElements = v.elementsAsList();
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.