[−][src]Function onednn_sys::dnnl_vanilla_rnn_backward_desc_init
pub unsafe extern "C" fn dnnl_vanilla_rnn_backward_desc_init(
rnn_desc: *mut dnnl_rnn_desc_t,
prop_kind: dnnl_prop_kind_t,
activation: dnnl_alg_kind_t,
direction: dnnl_rnn_direction_t,
src_layer_desc: *const dnnl_memory_desc_t,
src_iter_desc: *const dnnl_memory_desc_t,
weights_layer_desc: *const dnnl_memory_desc_t,
weights_iter_desc: *const dnnl_memory_desc_t,
bias_desc: *const dnnl_memory_desc_t,
dst_layer_desc: *const dnnl_memory_desc_t,
dst_iter_desc: *const dnnl_memory_desc_t,
diff_src_layer_desc: *const dnnl_memory_desc_t,
diff_src_iter_desc: *const dnnl_memory_desc_t,
diff_weights_layer_desc: *const dnnl_memory_desc_t,
diff_weights_iter_desc: *const dnnl_memory_desc_t,
diff_bias_desc: *const dnnl_memory_desc_t,
diff_dst_layer_desc: *const dnnl_memory_desc_t,
diff_dst_iter_desc: *const dnnl_memory_desc_t,
flags: c_uint,
alpha: f32,
beta: f32
) -> dnnl_status_t
Initializes a descriptor for vanilla RNN backward propagation primitive.
The following arguments may either be @c NULL or point to a zero memory descriptor:
- @p src_iter_desc together with @p diff_src_iter_desc,
- @p bias_desc together with @p diff_bias_desc,
- @p dst_iter_desc together with @p diff_dst_iter_desc.
This would then indicate that the RNN backward propagation primitive should not use the respective data and should use zero values instead.
@note All memory descriptors can be initialized with #dnnl_format_tag_any or with format_kind set to #dnnl_format_kind_any.
@param rnn_desc Output descriptor for vanilla RNN primitive. @param prop_kind Propagation kind. Must be #dnnl_backward. @param activation Activation kind. Possible values are #dnnl_eltwise_relu, #dnnl_eltwise_tanh or #dnnl_eltwise_logistic. @param direction RNN direction. See @ref dnnl_rnn_direction_t for more info. @param src_layer_desc Memory descriptor for the input vector. @param src_iter_desc Memory descriptor for the input recurrent hidden state vector. @param weights_layer_desc Memory descriptor for the weights applied to the layer input. @param weights_iter_desc Memory descriptor for the weights applied to the recurrent input. @param bias_desc Bias memory descriptor. @param dst_layer_desc Memory descriptor for the output vector. @param dst_iter_desc Memory descriptor for the output recurrent hidden state vector. @param diff_src_layer_desc Memory descriptor for the diff of input vector. @param diff_src_iter_desc Memory descriptor for the diff of input recurrent hidden state vector. @param diff_weights_layer_desc Memory descriptor for the diff of weights applied to the layer input. @param diff_weights_iter_desc Memory descriptor for the diff of weights applied to the recurrent input. @param diff_bias_desc Diff bias memory descriptor. @param diff_dst_layer_desc Memory descriptor for the diff of output vector. @param diff_dst_iter_desc Memory descriptor for the diff of output recurrent hidden state vector. @param flags Unused. @param alpha Negative slope if activation is #dnnl_eltwise_relu. @param beta Unused. @returns #dnnl_success on success and a status describing the error otherwise.