init¶
-
MaxPoolingLayer.
init
(prev_layer)¶ 初期処理
引数: - prev_layer (Layer) – 直前のレイヤー
ソース¶
init(prev_layer) {
super.init(prev_layer);
Assert(this.prevLayer instanceof ConvolutionalLayer, "Pooling-Layer-init");
this.numChannels = this.prevLayer.numChannels;
this.numRows = this.prevLayer.numRows / this.filterSize;
this.numCols = this.prevLayer.numCols / this.filterSize;
Assert(Math.ceil(this.numRows) == this.numRows && Math.ceil(this.numCols) == this.numCols);
this.unitSize = this.numChannels * this.numRows * this.numCols;
}