Struct cudnn::Cudnn
[−]
[src]
pub struct Cudnn { // some fields omitted }
Provides a the high-level interface to CUDA's cuDNN.
Methods
impl Cudnn
[src]
fn new() -> Result<Cudnn, Error>
Initializes a new CUDA cuDNN context.
Make sure your current CUDA device is cuDNN enabled.
fn from_c(id: cudnnHandle_t) -> Cudnn
Initializes a new CUDA cuDNN Context from its C type.
fn id(&self) -> isize
Returns the id as isize.
fn id_c(&self) -> cudnnHandle_t
Returns the CUDA cuDNN Context as its C type.
fn version() -> usize
Returns the version of the CUDA cuDNN library.
fn sigmoid_forward(&self, src_desc: &TensorDescriptor, src_data: *const c_void, dest_desc: &TensorDescriptor, dest_data: *mut c_void, scale: ScalParams) -> Result<(), Error>
Computes the forward Sigmoid Activation function.
Writes the result of the computation to dest_data
.
fn sigmoid_backward(&self, src_desc: &TensorDescriptor, src_data: *const c_void, src_diff_desc: &TensorDescriptor, src_diff_data: *const c_void, dest_desc: TensorDescriptor, dest_data: *const c_void, dest_diff_desc: TensorDescriptor, dest_diff_data: *mut c_void, scale: ScalParams) -> Result<(), Error>
Computes the backward Sigmoid Activation function.
Writes the result of the computation to dest_diff_data
.
fn relu_forward(&self, src_desc: TensorDescriptor, src_data: *const c_void, dest_desc: TensorDescriptor, dest_data: *mut c_void, scale: ScalParams) -> Result<(), Error>
Computes the forward Rectified Linear Activation function.
Writes the result of the computation to dest_data
.
fn relu_backward(&self, src_desc: &TensorDescriptor, src_data: *const c_void, src_diff_desc: &TensorDescriptor, src_diff_data: *const c_void, dest_desc: TensorDescriptor, dest_data: *const c_void, dest_diff_desc: TensorDescriptor, dest_diff_data: *mut c_void, scale: ScalParams) -> Result<(), Error>
Computes the backward Rectified Linear Activation function.
Writes the result of the computation to dest_diff_data
.
fn tanh_forward(&self, src_desc: TensorDescriptor, src_data: *const c_void, dest_desc: TensorDescriptor, dest_data: *mut c_void, scale: ScalParams) -> Result<(), Error>
Computes the forward Hyperbolic Tangent Activation function.
Writes the result of the computation to dest_data
.
fn tanh_backward(&self, src_desc: &TensorDescriptor, src_data: *const c_void, src_diff_desc: &TensorDescriptor, src_diff_data: *const c_void, dest_desc: TensorDescriptor, dest_data: *const c_void, dest_diff_desc: TensorDescriptor, dest_diff_data: *mut c_void, scale: ScalParams) -> Result<(), Error>
Computes the backward Hyperbolic Tangent Activation function.
Writes the result of the computation to dest_diff_data
.
Trait Implementations
impl Clone for Cudnn
[src]
fn clone(&self) -> Cudnn
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more