public class Convolution extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Convolution.Type |
Modifier and Type | Method and Description |
---|---|
static INDArray |
col2im(INDArray col,
INDArray z,
int sH,
int sW,
int pH,
int pW,
int kH,
int kW,
int dH,
int dW) |
static INDArray |
col2im(INDArray col,
int[] stride,
int[] padding,
int height,
int width) |
static INDArray |
col2im(INDArray col,
int sH,
int sW,
int ph,
int pW,
int kH,
int kW)
Rearrange matrix
columns into blocks
|
static INDArray |
conv2d(INDArray input,
INDArray kernel,
Convolution.Type type)
2d convolution (aka the last 2 dimensions
|
static INDArray |
convn(INDArray input,
INDArray kernel,
Convolution.Type type)
ND Convolution
|
static INDArray |
convn(INDArray input,
INDArray kernel,
Convolution.Type type,
int[] axes)
ND Convolution
|
static int |
effectiveKernelSize(int kernel,
int dilation) |
static INDArray |
im2col(INDArray img,
int[] kernel,
int[] stride,
int[] padding) |
static INDArray |
im2col(INDArray img,
int kh,
int kw,
int sy,
int sx,
int ph,
int pw,
boolean isSameMode)
Implement column formatted images
|
static INDArray |
im2col(INDArray img,
int kh,
int kw,
int sy,
int sx,
int ph,
int pw,
boolean isSameMode,
INDArray out) |
static INDArray |
im2col(INDArray img,
int kh,
int kw,
int sy,
int sx,
int ph,
int pw,
int pval,
boolean isSameMode)
Implement column formatted images
|
static INDArray |
im2col(INDArray img,
int kh,
int kw,
int sy,
int sx,
int ph,
int pw,
int dh,
int dw,
boolean isSameMode) |
static INDArray |
im2col(INDArray img,
int kh,
int kw,
int sy,
int sx,
int ph,
int pw,
int dH,
int dW,
boolean isSameMode,
INDArray out) |
static int |
outputSize(int size,
int k,
int s,
int p,
int dilation,
boolean isSameMode) |
static int |
outSize(int size,
int k,
int s,
int p,
int dilation,
boolean coverAll)
Deprecated.
|
static INDArray |
pooling2D(INDArray img,
int kh,
int kw,
int sy,
int sx,
int ph,
int pw,
int dh,
int dw,
boolean isSameMode,
Pooling2D.Pooling2DType type,
Pooling2D.Divisor divisor,
double extra,
int virtualHeight,
int virtualWidth,
INDArray out)
Pooling 2d implementation
|
public static INDArray col2im(INDArray col, int[] stride, int[] padding, int height, int width)
col
- stride
- padding
- height
- width
- public static INDArray col2im(INDArray col, int sH, int sW, int ph, int pW, int kH, int kW)
col
- the column
transposed image to convertsH
- stride heightsW
- stride widthph
- padding heightpW
- padding widthkH
- heightkW
- widthpublic static INDArray col2im(INDArray col, INDArray z, int sH, int sW, int pH, int pW, int kH, int kW, int dH, int dW)
public static INDArray im2col(INDArray img, int[] kernel, int[] stride, int[] padding)
img
- kernel
- stride
- padding
- public static INDArray im2col(INDArray img, int kh, int kw, int sy, int sx, int ph, int pw, boolean isSameMode)
img
- the image to processkh
- the kernel heightkw
- the kernel widthsy
- the stride along ysx
- the stride along xph
- the padding widthpw
- the padding heightisSameMode
- whether to cover the whole image or notpublic static INDArray im2col(INDArray img, int kh, int kw, int sy, int sx, int ph, int pw, int dh, int dw, boolean isSameMode)
public static INDArray im2col(INDArray img, int kh, int kw, int sy, int sx, int ph, int pw, boolean isSameMode, INDArray out)
public static INDArray im2col(INDArray img, int kh, int kw, int sy, int sx, int ph, int pw, int dH, int dW, boolean isSameMode, INDArray out)
public static INDArray pooling2D(INDArray img, int kh, int kw, int sy, int sx, int ph, int pw, int dh, int dw, boolean isSameMode, Pooling2D.Pooling2DType type, Pooling2D.Divisor divisor, double extra, int virtualHeight, int virtualWidth, INDArray out)
img
- kh
- kw
- sy
- sx
- ph
- pw
- dh
- dw
- isSameMode
- type
- extra
- optional argument. I.e. used in pnorm pooling.virtualHeight
- virtualWidth
- out
- public static INDArray im2col(INDArray img, int kh, int kw, int sy, int sx, int ph, int pw, int pval, boolean isSameMode)
img
- the image to processkh
- the kernel heightkw
- the kernel widthsy
- the stride along ysx
- the stride along xph
- the padding widthpw
- the padding heightpval
- the padding value (not used)isSameMode
- whether padding mode is 'same'@Deprecated public static int outSize(int size, int k, int s, int p, int dilation, boolean coverAll)
size
- k
- s
- p
- coverAll
- public static int outputSize(int size, int k, int s, int p, int dilation, boolean isSameMode)
public static int effectiveKernelSize(int kernel, int dilation)
public static INDArray conv2d(INDArray input, INDArray kernel, Convolution.Type type)
input
- the input to opkernel
- the kernel to convolve withtype
- public static INDArray convn(INDArray input, INDArray kernel, Convolution.Type type, int[] axes)
input
- the input to opkernel
- the kerrnel to op withtype
- the opType of convolutionaxes
- the axes to do the convolution alongpublic static INDArray convn(INDArray input, INDArray kernel, Convolution.Type type)
input
- the input to opkernel
- the kernel to op withtype
- the opType of convolutionCopyright © 2018. All rights reserved.