public void Cudnn_Descriptors_ConstructConvolutionWithSetup() { using (var filter = CudnnContext.CreateFilter(new CudnnFilterDescriptorParameters(CudnnType.Float, 10, 10, 2, 2))) using (var tensor = CudnnContext.CreateTensor(new CudnnTensorDescriptorParameters(CudnnType.Float, CudnnTensorFormat.MajorRow, 10, 10, 100, 100))) { var param = new CudnnConvolutionDescriptorParameters(CudnnConvolutionMode.Convolution, tensor, filter, 1, 1, 3, 3, 1, 1); using (var convolution = CudnnContext.CreateConvolution(param)) { Assert.True(convolution.IsInitialized); var dimensions = convolution.GetOutputTensor(CudnnConvolutionPath.Forward); Assert.NotNull(dimensions); } } }
public void Cudnn_Descriptors_ConstructConvolutionWithSetup() { using(var filter = CudnnContext.CreateFilter(new CudnnFilterDescriptorParameters(CudnnType.Float, 10, 10, 2, 2))) using (var tensor = CudnnContext.CreateTensor(new CudnnTensorDescriptorParameters(CudnnType.Float, CudnnTensorFormat.MajorRow, 10, 10, 100, 100))) { var param = new CudnnConvolutionDescriptorParameters(CudnnConvolutionMode.Convolution, tensor, filter, 1, 1, 3, 3, 1, 1); using (var convolution = CudnnContext.CreateConvolution(param)) { Assert.True(convolution.IsInitialized); var dimensions = convolution.GetOutputTensor(CudnnConvolutionPath.Forward); Assert.NotNull(dimensions); } } }