} else {
this.connectionWeights = weights;
}
this.wAdagrad = new AdagradLearningRate( this.connectionWeights.numRows(), this.connectionWeights.numCols() );
if (hBias == null) {
// TODO: recheck if this column vector is correctly oriented
this.hiddenBiasNeurons = new DenseMatrix(1, nHidden); //Matrix.zeros(nHidden);
//} else if(hBias.numRows() != nHidden) {
//throw new IllegalArgumentException("Hidden bias must have a length of " + nHidden + " length was " + hBias.numRows());
} else {
this.hiddenBiasNeurons = hBias;
}
// this.hBiasAdaGrad = new AdaGrad(hBias.rows,hBias.columns);
this.hBiasAdaGrad = new AdagradLearningRate( this.hiddenBiasNeurons.numRows(), this.hiddenBiasNeurons.numCols() );
if (vBias == null) {
this.visibleBiasNeurons = new DenseMatrix(1, nVisible); //Matrix.zeros(nVisible);
this.visibleBiasNeurons.assign(0);
} else if(vBias.numRows() != nVisible) {
throw new IllegalArgumentException("Visible bias must have a length of " + nVisible + " but length was " + vBias.numRows());
} else {
this.visibleBiasNeurons = vBias;
}
// this.vBiasAdaGrad = new AdaGrad(vBias.rows,vBias.columns);
this.vBiasAdaGrad = new AdagradLearningRate( this.visibleBiasNeurons.numRows(), this.visibleBiasNeurons.numCols() );
}