cpuDeltaZ ================== .. js:function:: AffineTransformationLayer.cpuDeltaZ() CPUによるδzの計算 ソース ^^^^^^ .. code-block:: js cpuDeltaZ(){ // 活性化関数 switch(this.activationFunction){ case ActivationFunction.none: for (var i = 0; i < this.deltaZ.dt.length; i++) { this.deltaZ.dt[i] = this.deltaY.dt[i]; } break; case ActivationFunction.sigmoid: for (var i = 0; i < this.deltaZ.dt.length; i++) { this.deltaZ.dt[i] = this.deltaY.dt[i] * sigmoid_prime(this.z_.dt[i]); } break; case ActivationFunction.ReLU: for (var i = 0; i < this.deltaZ.dt.length; i++) { this.deltaZ.dt[i] = (this.z_.dt[i] <= 0 ? 0 : this.deltaY.dt[i]); } break; } }