/// <summary>
 /// </summary>
 public LRNDescriptor(CudaDNNContext context)
 {
     _handle = context.Handle;
     _desc = new cudnnLRNDescriptor();
     res = CudaDNNNativeMethods.cudnnCreateLRNDescriptor(ref _desc);
     Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cudnnCreateLRNDescriptor", res));
     if (res != cudnnStatus.Success)
         throw new CudaDNNException(res);
 }
Beispiel #2
0
 /// <summary>
 /// </summary>
 public LRNDescriptor(CudaDNNContext context)
 {
     _handle = context.Handle;
     _desc   = new cudnnLRNDescriptor();
     res     = CudaDNNNativeMethods.cudnnCreateLRNDescriptor(ref _desc);
     Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cudnnCreateLRNDescriptor", res));
     if (res != cudnnStatus.Success)
     {
         throw new CudaDNNException(res);
     }
 }
		public static extern cudnnStatus cudnnDivisiveNormalizationForward(
									  cudnnHandle                    handle,
									  cudnnLRNDescriptor             normDesc,
									  cudnnDivNormMode               mode,
									  ref double alpha,
									  cudnnTensorDescriptor    srcDesc, // same desc for means, temp, temp2
									  CUdeviceptr srcData,
									  CUdeviceptr srcMeansData, // if NULL, means are assumed to be zero
									  CUdeviceptr tempData,
									  CUdeviceptr tempData2,
									  ref double beta,
									  cudnnTensorDescriptor    destDesc,
									  CUdeviceptr destData
									  );
		public static extern cudnnStatus cudnnDivisiveNormalizationBackward(
									  cudnnHandle                    handle,
									  cudnnLRNDescriptor             normDesc,
									  cudnnDivNormMode               mode,
									  ref double alpha,
									  cudnnTensorDescriptor    srcDesc, // same desc for diff, means, temp, temp2
									  CUdeviceptr srcData,
									  CUdeviceptr srcMeansData, // if NULL, means are assumed to be zero
									  CUdeviceptr srcDiffData,
									  CUdeviceptr tempData,
									  CUdeviceptr tempData2,
									  ref double beta,
									  cudnnTensorDescriptor    destDataDesc, // same desc for dest, means, meansDiff
									  CUdeviceptr destDataDiff, // output data differential
									  CUdeviceptr destMeansDiff // output means differential, can be NULL
									  );
		public static extern cudnnStatus cudnnLRNCrossChannelBackward(
									  cudnnHandle                    handle,
									  cudnnLRNDescriptor             normDesc,
									  cudnnLRNMode                   lrnMode,
									  ref double alpha,
									  cudnnTensorDescriptor    srcDesc,
									  CUdeviceptr srcData,
									  cudnnTensorDescriptor    srcDiffDesc,
									  CUdeviceptr srcDiffData,
									  cudnnTensorDescriptor    destDesc,
									  CUdeviceptr destData,
									  ref double beta,
									  cudnnTensorDescriptor    destDiffDesc,
									  CUdeviceptr destDiffData);
		public static extern cudnnStatus cudnnLRNCrossChannelForward(
									  cudnnHandle                    handle,
									  cudnnLRNDescriptor             normDesc,
									  cudnnLRNMode                   lrnMode,
									  ref float alpha,
									  cudnnTensorDescriptor    srcDesc,
									  CUdeviceptr srcData,
									  ref float beta,
									  cudnnTensorDescriptor    destDesc,
									  CUdeviceptr destData);
		public static extern cudnnStatus cudnnDestroyLRNDescriptor( cudnnLRNDescriptor lrnDesc );
		public static extern cudnnStatus cudnnGetLRNDescriptor(
									  cudnnLRNDescriptor   normDesc,
									  ref uint              lrnN,
									  ref double                lrnAlpha,
									  ref double                lrnBeta,
									  ref double                lrnK);
		public static extern cudnnStatus cudnnCreateLRNDescriptor(ref cudnnLRNDescriptor normDesc);