示例#1
0
        public static CudnnPoolingDescriptor CreatePooling(CudnnPoolingDescriptorParameters parameters)
        {
            var pooling = CreatePooling();

            pooling.SetParameters(parameters);
            return(pooling);
        }
        public void SetParameters(CudnnPoolingDescriptorParameters param)
        {
            if (param == null)
                throw new ArgumentNullException("param");

            Contract.EndContractBlock();

            CudnnContext.Invoke(() => CudnnNativeMethods.cudnnSetPoolingDescriptor(
                    this.Handle, param.Mode,
                    param.Height, param.Width,
                    param.HeightStride, param.WidthStride));

            this.descriptorParams = param;
        }
        public void SetParameters(CudnnPoolingDescriptorParameters param)
        {
            if (param == null)
            {
                throw new ArgumentNullException("param");
            }

            Contract.EndContractBlock();

            CudnnContext.Invoke(() => CudnnNativeMethods.cudnnSetPoolingDescriptor(
                                    this.Handle, param.Mode,
                                    param.Height, param.Width,
                                    param.HeightStride, param.WidthStride));

            this.descriptorParams = param;
        }
示例#4
0
 public static CudnnPoolingDescriptor CreatePooling(CudnnPoolingDescriptorParameters parameters)
 {
     var pooling = CreatePooling();
     pooling.SetParameters(parameters);
     return pooling;
 }