Beispiel #1
0
 static public TensorShape ApplyPool(this TensorShape shape, int[] pool, int[] stride, int[] pad, bool ceilMode = false)
 {
     return(ApplyPool(shape, (pool[0], pool[1]), stride, pad, ceilMode));
 }
Beispiel #2
0
 static public TensorShape ApplyKernel(this TensorShape shape, TensorShape kernel, int[] stride, int[] pad)
 {
     shape = ApplyPool(shape, (kernel.kernelWidth, kernel.kernelHeight), stride, pad);
     return(new TensorShape(shape.batch, shape.height, shape.width, kernel.kernelCount));
 }
 static public TensorShape ApplyKernel(this TensorShape shape, TensorShape kernel, int[] stride, int[] pad)
 {
     int[] shapeArray = ApplyPool(shape, (kernel.kernelWidth, kernel.kernelHeight), stride, pad).ToArray();
     shapeArray[7] = kernel.kernelCount;
     return(new TensorShape(shapeArray));
 }