init ======== .. js:function:: FullyConnectedLayer.init(prev_layer) 初期処理 :param Layer prev_layer: 直前のレイヤー ソース ^^^^^^ .. code-block:: js init(prev_layer) { super.init(prev_layer); this.bias = random.randn(this.unitSize, 1); this.weight = random.randn(this.unitSize, this.prevLayer.unitSize); if(this.activationFunction == ActivationFunction.ReLU){ var sd = Math.sqrt(2.0 / prev_layer.unitSize); for(var i = 0; i < this.weight.dt.length; i++){ this.weight.dt[i] *= sd; } } this.deltaWeight = new ArrayView(this.unitSize, this.prevLayer.unitSize); }