public class OldConvolution extends Object
Constructor and Description |
---|
OldConvolution() |
Modifier and Type | Method and Description |
---|---|
static INDArray |
col2im(INDArray col,
int[] stride,
int[] padding,
int height,
int width) |
static INDArray |
col2im(INDArray col,
int sy,
int sx,
int ph,
int pw,
int h,
int w)
Rearrange matrix
columns into blocks
|
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,
int pval,
boolean coverAll)
Implement column formatted images
|
static int |
outSize(int size,
int k,
int s,
int p,
boolean coverAll)
The out size for a convolution
|
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 sy, int sx, int ph, int pw, int h, int w)
col
- the column
transposed image to convertsy
- stride ysx
- stride xph
- padding heightpw
- padding widthh
- heightw
- widthpublic 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, int pval, boolean coverAll)
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 valuecoverAll
- whether to cover the whole image or notpublic static int outSize(int size, int k, int s, int p, boolean coverAll)
size
- k
- s
- p
- coverAll
- Copyright © 2016. All Rights Reserved.