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

GetConvolutionNdForwardOutputDim() public method

This function returns the dimensions of the resulting n-D tensor of a nbDims-2-D convolution, given the convolution descriptor, the input tensor descriptor and the filter descriptor This function can help to setup the output tensor and allocate the proper amount of memory prior to launch the actual convolution. Each dimension of the (nbDims-2)-D images of the output tensor is computed as followed: outputDim = 1 + (inputDim + 2*pad - filterDim)/convolutionStride;
public GetConvolutionNdForwardOutputDim ( TensorDescriptor inputTensorDesc, FilterDescriptor filterDesc, int nbDims, int tensorOuputDimA ) : void
inputTensorDesc TensorDescriptor Handle to a previously initialized tensor descriptor.
filterDesc FilterDescriptor Handle to a previously initialized filter descriptor.
nbDims int Dimension of the output tensor
tensorOuputDimA int Array of dimensions nbDims that contains on exit of this routine the sizes /// of the output tensor
return void
        public void GetConvolutionNdForwardOutputDim(TensorDescriptor inputTensorDesc,
													FilterDescriptor filterDesc,
													int nbDims,
													int[] tensorOuputDimA
												)
        {
            res = CudaDNNNativeMethods.cudnnGetConvolutionNdForwardOutputDim(_desc, inputTensorDesc.Desc, filterDesc.Desc, nbDims, tensorOuputDimA);
            Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cudnnGetConvolutionNdForwardOutputDim", res));
            if (res != cudnnStatus.Success) throw new CudaDNNException(res);
        }