예제 #1
0
 public void SetPoolingNdDescriptor(cudnnPoolingMode mode,
                                    int nbDims,
                                    int[] windowDimA,
                                    int[] paddingA,
                                    int[] strideA
                                    )
 {
     res = CudaDNNNativeMethods.cudnnSetPoolingNdDescriptor(_desc, mode, nbDims, windowDimA, paddingA, strideA);
     Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cudnnSetPoolingNdDescriptor", res));
     if (res != cudnnStatus.Success)
     {
         throw new CudaDNNException(res);
     }
 }
예제 #2
0
 /// <summary>
 /// This function queries a previously initialized generic pooling descriptor object.
 /// </summary>
 /// <param name="nbDimsRequested">Dimension of the expected pooling descriptor. It is also the minimum
 /// size of the arrays windowDimA, paddingA and strideA in order to be
 /// able to hold the results</param>
 /// <param name="mode">Enumerant to specify the pooling mode.</param>
 /// <param name="maxpoolingNanOpt">Nan propagation option for max pooling.</param>
 /// <param name="nbDims">Actual dimension of the pooling descriptor.</param>
 /// <param name="windowDimA">Array of dimension of at least nbDimsRequested that will be filled with
 /// the window parameters from the provided pooling descriptor.</param>
 /// <param name="paddingA">Array of dimension of at least nbDimsRequested that will be filled with
 /// the padding parameters from the provided pooling descriptor.</param>
 /// <param name="strideA">Array of dimension at least nbDimsRequested that will be filled with
 /// the stride parameters from the provided pooling descriptor.</param>
 public void GetPoolingNdDescriptor(int nbDimsRequested,
                                    ref cudnnPoolingMode mode,
                                    ref cudnnNanPropagation maxpoolingNanOpt,
                                    ref int nbDims,
                                    int[] windowDimA,
                                    int[] paddingA,
                                    int[] strideA
                                    )
 {
     res = CudaDNNNativeMethods.cudnnGetPoolingNdDescriptor(_desc, nbDimsRequested, ref mode, ref maxpoolingNanOpt, ref nbDims, windowDimA, paddingA, strideA);
     Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cudnnGetPoolingNdDescriptor", res));
     if (res != cudnnStatus.Success)
     {
         throw new CudaDNNException(res);
     }
 }
예제 #3
0
 public void SetPooling2dDescriptor(cudnnPoolingMode mode,
                                    int windowHeight,
                                    int windowWidth,
                                    int verticalPadding,
                                    int horizontalPadding,
                                    int verticalStride,
                                    int horizontalStride
                                    )
 {
     res = CudaDNNNativeMethods.cudnnSetPooling2dDescriptor(_desc, mode, windowHeight, windowWidth, verticalPadding, horizontalPadding, verticalStride, horizontalStride);
     Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cudnnSetPooling2dDescriptor", res));
     if (res != cudnnStatus.Success)
     {
         throw new CudaDNNException(res);
     }
 }
예제 #4
0
 /// <summary>
 /// This function queries a previously created 2D pooling descriptor object.
 /// </summary>
 /// <param name="mode">Enumerant to specify the pooling mode.</param>
 /// <param name="maxpoolingNanOpt">Nan propagation option for max pooling.</param>
 /// <param name="windowHeight">Height of the pooling window.</param>
 /// <param name="windowWidth">Width of the pooling window.</param>
 /// <param name="verticalPadding">Size of vertical padding.</param>
 /// <param name="horizontalPadding">Size of horizontal padding.</param>
 /// <param name="verticalStride">Pooling vertical stride.</param>
 /// <param name="horizontalStride">Pooling horizontal stride.</param>
 public void GetPooling2dDescriptor(ref cudnnPoolingMode mode,
                                    ref cudnnNanPropagation maxpoolingNanOpt,
                                    ref int windowHeight,
                                    ref int windowWidth,
                                    ref int verticalPadding,
                                    ref int horizontalPadding,
                                    ref int verticalStride,
                                    ref int horizontalStride
                                    )
 {
     res = CudaDNNNativeMethods.cudnnGetPooling2dDescriptor(_desc, ref mode, ref maxpoolingNanOpt, ref windowHeight, ref windowWidth, ref verticalPadding, ref horizontalPadding, ref verticalStride, ref horizontalStride);
     Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cudnnGetPooling2dDescriptor", res));
     if (res != cudnnStatus.Success)
     {
         throw new CudaDNNException(res);
     }
 }
예제 #5
0
        public void GetPooling2dDescriptor(ref cudnnPoolingMode mode,
											ref int windowHeight,
											ref int windowWidth,
											ref int verticalPadding,
											ref int horizontalPadding,
											ref int verticalStride,
											ref int horizontalStride
										)
        {
            res = CudaDNNNativeMethods.cudnnGetPooling2dDescriptor(_desc, ref mode, ref windowHeight, ref windowWidth, ref verticalPadding, ref horizontalPadding, ref verticalStride, ref horizontalStride);
            Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cudnnGetPooling2dDescriptor", res));
            if (res != cudnnStatus.Success) throw new CudaDNNException(res);
        }
예제 #6
0
        public void SetPoolingNdDescriptor(cudnnPoolingMode mode,
											int nbDims,
											int[] windowDimA,
											int[] paddingA,
											int[] strideA
										)
        {
            res = CudaDNNNativeMethods.cudnnSetPoolingNdDescriptor(_desc, mode, nbDims, windowDimA, paddingA, strideA);
            Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cudnnSetPoolingNdDescriptor", res));
            if (res != cudnnStatus.Success) throw new CudaDNNException(res);
        }
예제 #7
0
		public static extern cudnnStatus cudnnGetPoolingNdDescriptor(  cudnnPoolingDescriptor poolingDesc,
																int nbDimsRequested,
																ref cudnnPoolingMode mode,
																ref int nbDims,
																int[] windowDimA,
																int[] paddingA,
																int[] strideA
															 );
예제 #8
0
		public static extern cudnnStatus cudnnSetPoolingNdDescriptor(  cudnnPoolingDescriptor poolingDesc,
																cudnnPoolingMode mode,
																int nbDims,
																int[] windowDimA,
																int[] paddingA,
																int[] strideA
														   );
예제 #9
0
		public static extern cudnnStatus cudnnGetPooling2dDescriptor(  cudnnPoolingDescriptor poolingDesc,
																ref cudnnPoolingMode mode,
																ref int windowHeight,
																ref int windowWidth,
																ref int verticalPadding,
																ref int horizontalPadding,
																ref int verticalStride,
																ref int horizontalStride
														   );
예제 #10
0
        public static extern cudnnStatus cudnnSetPooling2dDescriptor(  cudnnPoolingDescriptor poolingDesc,
																cudnnPoolingMode mode,
                                                                cudnnNanPropagation maxpoolingNanOpt,
                                                                int windowHeight,
																int windowWidth,
																int verticalPadding,
																int horizontalPadding,
																int verticalStride,
																int horizontalStride
														   );
예제 #11
0
        /// <summary>
        /// This function initializes a previously created generic pooling descriptor object into a 2D description.
        /// </summary>
        /// <param name="mode">Enumerant to specify the pooling mode.</param>
        /// <param name="maxpoolingNanOpt">Nan propagation option for max pooling.</param>
        /// <param name="windowHeight">Height of the pooling window.</param>
        /// <param name="windowWidth">Width of the pooling window.</param>
        /// <param name="verticalPadding">Size of vertical padding.</param>
        /// <param name="horizontalPadding">Size of horizontal padding</param>
        /// <param name="verticalStride">Pooling vertical stride.</param>
        /// <param name="horizontalStride">Pooling horizontal stride.</param>
        public void SetPooling2dDescriptor(cudnnPoolingMode mode,
                                            cudnnNanPropagation maxpoolingNanOpt,
                                            int windowHeight,
										    int windowWidth,
										    int verticalPadding,
										    int horizontalPadding,
										    int verticalStride,
										    int horizontalStride
														   )
        {
            res = CudaDNNNativeMethods.cudnnSetPooling2dDescriptor(_desc, mode, maxpoolingNanOpt, windowHeight, windowWidth, verticalPadding, horizontalPadding, verticalStride, horizontalStride);
            Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cudnnSetPooling2dDescriptor", res));
            if (res != cudnnStatus.Success) throw new CudaDNNException(res);
        }
예제 #12
0
        /// <summary>
        /// This function queries a previously initialized generic pooling descriptor object.
        /// </summary>
        /// <param name="nbDimsRequested">Dimension of the expected pooling descriptor. It is also the minimum
        /// size of the arrays windowDimA, paddingA and strideA in order to be
        /// able to hold the results</param>
        /// <param name="mode">Enumerant to specify the pooling mode.</param>
        /// <param name="maxpoolingNanOpt">Nan propagation option for max pooling.</param>
        /// <param name="nbDims">Actual dimension of the pooling descriptor.</param>
        /// <param name="windowDimA">Array of dimension of at least nbDimsRequested that will be filled with
        /// the window parameters from the provided pooling descriptor.</param>
        /// <param name="paddingA">Array of dimension of at least nbDimsRequested that will be filled with
        /// the padding parameters from the provided pooling descriptor.</param>
        /// <param name="strideA">Array of dimension at least nbDimsRequested that will be filled with
        /// the stride parameters from the provided pooling descriptor.</param>
        public void GetPoolingNdDescriptor(int nbDimsRequested,
											ref cudnnPoolingMode mode,
                                            ref cudnnNanPropagation maxpoolingNanOpt,
                                            ref int nbDims,
											int[] windowDimA,
											int[] paddingA,
											int[] strideA
											)
        {
            res = CudaDNNNativeMethods.cudnnGetPoolingNdDescriptor(_desc, nbDimsRequested, ref mode, ref maxpoolingNanOpt, ref nbDims, windowDimA, paddingA, strideA);
            Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cudnnGetPoolingNdDescriptor", res));
            if (res != cudnnStatus.Success) throw new CudaDNNException(res);
        }