当前位置: 首页>>代码示例>>Java>>正文


Java FloatMatrix.zeros方法代码示例

本文整理汇总了Java中org.jblas.FloatMatrix.zeros方法的典型用法代码示例。如果您正苦于以下问题:Java FloatMatrix.zeros方法的具体用法?Java FloatMatrix.zeros怎么用?Java FloatMatrix.zeros使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.jblas.FloatMatrix的用法示例。


在下文中一共展示了FloatMatrix.zeros方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initialize

import org.jblas.FloatMatrix; //导入方法依赖的package包/类
/**
 * Initializes the GRU layer
 * @param hiddenW1 multiplies x_t in the expression to calculate candidate activation
 * @param hiddenU1 multiplies r_t.h_t-1 in the expression to calculate candidate activation
 * @param updateW1 multiplies x_t in the expression to calculate update gate
 * @param updateU1 multiplies h_t-1 in the expression to calculate update gate
 * @param resetW1 multiplies x_t in the expression to calculate reset gate
 * @param resetU1 multiplies h_t-1 in the expression to calculate reset gate
 * @param hiddenBias1 bias values of the neurons to calculate the candidate activation
 * @param updateBias1 bias values of the neurons to calculate the update gate
 * @param resetBias1 bias values of the neurons to calculate the reset gate
 * @param activationFunction1 activation function to calculate the candidate activation
 * @param updateActivation1 activation function to calculate the update gate
 * @param resetActivation1 activation function to calculate the reset gate
 */
public void initialize(float[][] hiddenW1, float[][] hiddenU1, float[][] updateW1, float[][] updateU1, float[][] resetW1, float[][] resetU1, float[] hiddenBias1, float[] updateBias1, float[] resetBias1, Activation activationFunction1, Activation updateActivation1, Activation resetActivation1) {
    this.hiddenW = new FloatMatrix(hiddenW1);
    this.hiddenU = new FloatMatrix(hiddenU1);
    this.resetW = new FloatMatrix(resetW1);
    this.resetU = new FloatMatrix(resetU1);
    this.updateW = new FloatMatrix(updateW1);
    this.updateU = new FloatMatrix(updateU1);
    this.hiddenBias = new FloatMatrix(hiddenBias1);
    this.updateBias = new FloatMatrix(updateBias1);
    this.resetBias = new FloatMatrix(resetBias1);
    this.output = FloatMatrix.zeros(this.hiddenU.rows);
    this.activationFunction = activationFunction1;
    this.updateActivation = updateActivation1;
    this.resetActivation = resetActivation1;
    this.updateGate = FloatMatrix.zeros(this.hiddenBias.length);
    this.resetGate = FloatMatrix.zeros(this.hiddenBias.length);            
}
 
开发者ID:SensorsINI,项目名称:jaer,代码行数:33,代码来源:RNNetwork.java

示例2: processRNNList

import org.jblas.FloatMatrix; //导入方法依赖的package包/类
/**
 * Process the RNN in a batch manner
 */
public void processRNNList() {
    if (this.binnedDataList.isEmpty()) {
        return;
    }
    FloatMatrix tempOutput;
    tempOutput = FloatMatrix.zeros(this.getnChannels());
    for (float[] currentBinnedData : this.binnedDataList) {
        tempOutput = this.rnnetwork.output(currentBinnedData);
    }
    this.networkOutput = RNNfilterExpFeatures.DMToFloat(tempOutput);
    this.label = RNNfilterExpFeatures.indexOfMaxValue(this.networkOutput);
}
 
开发者ID:SensorsINI,项目名称:jaer,代码行数:16,代码来源:RNNfilterExpFeatures.java

示例3: resetLayer

import org.jblas.FloatMatrix; //导入方法依赖的package包/类
@Override
public void resetLayer() {
    this.output = FloatMatrix.zeros(this.Uo.rows);
    this.memoryCell = FloatMatrix.zeros(this.Uc.rows);
    this.forgetGate = FloatMatrix.zeros(this.Uf.rows);
    this.inputGate = FloatMatrix.zeros(this.Ui.rows);
}
 
开发者ID:SensorsINI,项目名称:jaer,代码行数:8,代码来源:RNNetwork.java

示例4: processRNNList

import org.jblas.FloatMatrix; //导入方法依赖的package包/类
/**
 * Process the RNN in a batch manner
 */
public void processRNNList() {
    if (this.binnedDataList.isEmpty()) {
        return;
    }
    FloatMatrix tempOutput;
    tempOutput = FloatMatrix.zeros(this.getnChannels());
    for (int[] currentBinnedData : this.binnedDataList) {
        tempOutput = this.rnnetwork.output(RNNfilter.intToFloat(currentBinnedData));
    }
    this.networkOutput = RNNfilter.DMToFloat(tempOutput);
    this.label = RNNfilter.indexOfMaxValue(this.networkOutput);
}
 
开发者ID:SensorsINI,项目名称:jaer,代码行数:16,代码来源:RNNfilter.java

示例5: initParameters

import org.jblas.FloatMatrix; //导入方法依赖的package包/类
/**
 * Init context, item and feature latent vectors with a normal distribution and
 * set biases to 0.
 * @param numFeatures number of additional features
 * @param dimensions number of latent factors
 */
public void initParameters(int numFeatures, int dimensions) {
    logger.info("initializing parameters...");
    biases = FloatMatrix.zeros(numFeatures);
    latentVectors = new FloatMatrix[numFeatures];
    for (int i = 0; i < numFeatures; ++i)
        latentVectors[i] = gaussVector(dimensions).divi(dimensions);
}
 
开发者ID:ozgurdemir,项目名称:item-item-factorization,代码行数:14,代码来源:Factorization.java


注:本文中的org.jblas.FloatMatrix.zeros方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。