/// <summary>
        ///     This function is used to query the amount of space required to store the states of the random number generators
        ///     used by cudnnDropoutForward function.
        /// </summary>
        public SizeT GetDropoutStateSize()
        {
            var sizeInBytes = new SizeT();
            var res         = CudaDNNNativeMethods.cudnnDropoutGetStatesSize(this.Handle, ref sizeInBytes);

            if (res != cudnnStatus.Success)
            {
                throw new CudaDNNException(res);
            }
            return(sizeInBytes);
        }
Пример #2
0
        /// <summary>
        ///     This function is used to query the amount of space required to store the states of the random number generators
        ///     used by cudnnDropoutForward function.
        /// </summary>
        public SizeT GetDropoutStateSize()
        {
            var sizeInBytes = new SizeT();
            var res         = CudaDNNNativeMethods.cudnnDropoutGetStatesSize(this.Handle, ref sizeInBytes);

            //Debug.WriteLine("{0:G}, {1}: {2}", DateTime.Now, "cudnnDropoutGetStatesSize", res);
            if (res != cudnnStatus.Success)
            {
                throw new CudaDNNException(res);
            }
            return(sizeInBytes);
        }