ManagedCuda.CudaDNN.ConvolutionDescriptor.SetConvolution2dDescriptor C# (CSharp) Method

SetConvolution2dDescriptor() public method

This function initializes a previously created convolution descriptor object into a 2D correlation. This function assumes that the tensor and filter descriptors corresponds to the formard convolution path and checks if their settings are valid. That same convolution descriptor can be reused in the backward path provided it corresponds to the same layer.
public SetConvolution2dDescriptor ( int pad_h, int pad_w, int u, int v, int upscalex, int upscaley, cudnnConvolutionMode mode, cudnnDataType dataType ) : void
pad_h int zero-padding height: number of rows of zeros implicitly concatenated /// onto the top and onto the bottom of input images.
pad_w int zero-padding width: number of columns of zeros implicitly concatenated /// onto the left and onto the right of input images.
u int Vertical filter stride.
v int Horizontal filter stride.
upscalex int Upscale the input in x-direction.
upscaley int Upscale the input in y-direction.
mode cudnnConvolutionMode Selects between CUDNN_CONVOLUTION and CUDNN_CROSS_CORRELATION.
dataType cudnnDataType Selects the datatype in which the computation will be done.
return void
        public void SetConvolution2dDescriptor(int pad_h,    // zero-padding height
												int pad_w,    // zero-padding width
												int u,        // vertical filter stride
												int v,        // horizontal filter stride
												int upscalex, // upscale the input in x-direction
												int upscaley, // upscale the input in y-direction
												cudnnConvolutionMode mode,
                                                cudnnDataType dataType
                                                )
        {
            res = CudaDNNNativeMethods.cudnnSetConvolution2dDescriptor(_desc, pad_h, pad_w, u, v, upscalex, upscaley, mode, dataType);
            Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cudnnSetConvolution2dDescriptor", res));
            if (res != cudnnStatus.Success) throw new CudaDNNException(res);
        }