/// <summary>
 /// An opaque structure holding the description of an activation operation.
 /// </summary>
 public ActivationDescriptor()
 {
     _desc = new cudnnActivationDescriptor();
     res = CudaDNNNativeMethods.cudnnCreateActivationDescriptor(ref _desc);
     Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cudnnCreateTensorDescriptor", res));
     if (res != cudnnStatus.Success) throw new CudaDNNException(res);
 }
示例#2
0
 /// <summary>
 /// An opaque structure holding the description of an activation operation.
 /// </summary>
 public ActivationDescriptor()
 {
     _desc = new cudnnActivationDescriptor();
     res   = CudaDNNNativeMethods.cudnnCreateActivationDescriptor(ref _desc);
     Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cudnnCreateTensorDescriptor", res));
     if (res != cudnnStatus.Success)
     {
         throw new CudaDNNException(res);
     }
 }
        public static extern cudnnStatus cudnnActivationBackward( cudnnHandle handle,
                                                           cudnnActivationDescriptor activationDesc,
                                                           ref float alpha,
														   cudnnTensorDescriptor srcDesc,
														   CUdeviceptr srcData,
														   cudnnTensorDescriptor srcDiffDesc,
														   CUdeviceptr srcDiffData,
														   cudnnTensorDescriptor destDesc,
														   CUdeviceptr destData,
														   ref float beta,
														   cudnnTensorDescriptor destDiffDesc,
														   CUdeviceptr destDiffData
														 );
 public static extern cudnnStatus cudnnDestroyActivationDescriptor(
                                 cudnnActivationDescriptor activationDesc);
 public static extern cudnnStatus cudnnCreateActivationDescriptor(
                     ref cudnnActivationDescriptor activationDesc);
 public static extern cudnnStatus cudnnSetActivationDescriptor(
                                 cudnnActivationDescriptor activationDesc,
                                 cudnnActivationMode mode,
                                 cudnnNanPropagation reluNanOpt,
                                 double reluCeiling);
        public static extern cudnnStatus cudnnActivationForward( cudnnHandle handle,
                                                          cudnnActivationDescriptor activationDesc,
                                                          ref double alpha,
														  cudnnTensorDescriptor srcDesc,
														  CUdeviceptr srcData,
														  ref double beta,
														  cudnnTensorDescriptor destDesc,
														  CUdeviceptr destData
														);