Beispiel #1
0
        public Tensor Col2Im(Tensor cols, long[] x_shape, Tuple <int, int> kernalSize, int padding = 1, int stride = 1)
        {
            uint ox = (uint)x_shape[2];
            uint oy = (uint)x_shape[3];

            return(Out(ImgPro.Wrap(In(cols), (uint)kernalSize.Item1, (uint)kernalSize.Item2, ox, oy, (uint)padding, (uint)padding, (uint)stride, (uint)stride, true)));
        }
Beispiel #2
0
 public Tensor Im2Col(Tensor x, Tuple <int, int> kernalSize, int padding = 1, int stride = 1)
 {
     return(Out(ImgPro.Unwrap(In(x), (uint)kernalSize.Item1, (uint)kernalSize.Item2, (uint)padding, (uint)padding, (uint)stride, (uint)stride, true)));
 }