public Pooling2D(INDArray x, int kh, int kw, int sy, int sx, int ph, int pw, boolean isSameMode, Pooling2DType type, double extra, int virtualHeight, int virtualWidth, INDArray z) { super(x); this.kh = kh; this.kw = kw; this.sy = sy; this.sx = sx; this.ph = ph; this.pw = pw; this.isSameMode = isSameMode; this.type = type; this.z = z; this.extra = extra; this.im2colShape = getNewOutputShape(x, kh, kw, sy, sx, ph, pw, virtualHeight, virtualWidth, false); extraArgs = this.extraArgs(); }
public static INDArray pooling2D(INDArray img, int kh, int kw, int sy, int sx, int ph, int pw, boolean isSameMode, Pooling2D.Pooling2DType type, double extra, int virtualHeight, int virtualWidth, INDArray out) { Pooling2D pooling = new Pooling2D(img, kh, kw, sy, sx, ph, pw, isSameMode, type, extra, virtualHeight, virtualWidth, out); return Nd4j.getExecutioner().exec(pooling).z(); }
extraz.get().put(10, ((Pooling2D) op).getIm2colShape().addressPointer());