/// <summary>
 /// 
 /// </summary>
 /// <param name="context"></param>
 public SpatialTransformerDescriptor(CudaDNNContext context)
 {
     _handle = context.Handle;
     _desc = new cudnnSpatialTransformerDescriptor();
     res = CudaDNNNativeMethods.cudnnCreateSpatialTransformerDescriptor(ref _desc);
     Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cudnnCreateSpatialTransformerDescriptor", res));
     if (res != cudnnStatus.Success) throw new CudaDNNException(res);
 }
Beispiel #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="context"></param>
 public SpatialTransformerDescriptor(CudaDNNContext context)
 {
     _handle = context.Handle;
     _desc   = new cudnnSpatialTransformerDescriptor();
     res     = CudaDNNNativeMethods.cudnnCreateSpatialTransformerDescriptor(ref _desc);
     Debug.Write("");//Line(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cudnnCreateSpatialTransformerDescriptor", res));
     if (res != cudnnStatus.Success)
     {
         throw new CudaDNNException(res);
     }
 }
 public static extern cudnnStatus cudnnSpatialTfSamplerForward(
                                  cudnnHandle handle,
                                  cudnnSpatialTransformerDescriptor stDesc,
                                  ref double alpha,
                                  cudnnTensorDescriptor xDesc,
                                  CUdeviceptr x,
                                  CUdeviceptr grid,
                                  ref double beta,
                                  cudnnTensorDescriptor yDesc,
                                  CUdeviceptr y);
 public static extern cudnnStatus cudnnCreateSpatialTransformerDescriptor(
                                ref cudnnSpatialTransformerDescriptor stDesc);
 public static extern cudnnStatus cudnnSpatialTfSamplerBackward(
                                  cudnnHandle handle,
                                  cudnnSpatialTransformerDescriptor stDesc,
                                  ref double alpha,
                                  cudnnTensorDescriptor xDesc,
                                  CUdeviceptr x,
                                  ref double beta,
                                  cudnnTensorDescriptor dxDesc,
                                  CUdeviceptr dx,
                                  CUdeviceptr alphaDgrid,
                                  cudnnTensorDescriptor dyDesc,
                                  CUdeviceptr dy,
                                  CUdeviceptr grid,
                                  CUdeviceptr betaDgrid,
                                  CUdeviceptr dgrid);
 public static extern cudnnStatus cudnnSpatialTfGridGeneratorForward(
                                  cudnnHandle handle,
                                  cudnnSpatialTransformerDescriptor stDesc,
                                  CUdeviceptr theta,
                                  CUdeviceptr grid);
 public static extern cudnnStatus cudnnSpatialTfGridGeneratorBackward(
                                  cudnnHandle handle,
                                  cudnnSpatialTransformerDescriptor stDesc,
                                  CUdeviceptr dgrid,
                                  CUdeviceptr dtheta);
 public static extern cudnnStatus cudnnSetSpatialTransformerNdDescriptor(
                                 cudnnSpatialTransformerDescriptor stDesc,
                                 cudnnSamplerType samplerType,
                                 cudnnDataType dataType,
                                 int nbDims,
                                 int []dimA);
 public static extern cudnnStatus cudnnDestroySpatialTransformerDescriptor(
                                  cudnnSpatialTransformerDescriptor stDesc);