A primitive to compute element-wise operations such as parametric rectifier linear unit (ReLU). More...
Functions | |
dnnl_status_t DNNL_API | dnnl_eltwise_forward_desc_init (dnnl_eltwise_desc_t *eltwise_desc, dnnl_prop_kind_t prop_kind, dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *data_desc, float alpha, float beta) |
Initializes an eltwise_desc for forward propagation using prop_kind (possible values are dnnl_forward_training and dnnl_forward_inference), alg_kind algorithm, memory descriptor data_desc , alpha , and beta parameters. More... | |
dnnl_status_t DNNL_API | dnnl_eltwise_backward_desc_init (dnnl_eltwise_desc_t *eltwise_desc, dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *diff_data_desc, const dnnl_memory_desc_t *data_desc, float alpha, float beta) |
Initializes an eltwise_desc for backward propagation using alg_kind algorithm memory descriptors diff_data_desc and data_desc , and the alpha and beta parameters. More... | |
A primitive to compute element-wise operations such as parametric rectifier linear unit (ReLU).
Both forward and backward passes support in-place operation; that is, src and dst point to the same memory for forward pass, and diff_dst and diff_src point to the same memory for backward pass.
dnnl_status_t DNNL_API dnnl_eltwise_forward_desc_init | ( | dnnl_eltwise_desc_t * | eltwise_desc, |
dnnl_prop_kind_t | prop_kind, | ||
dnnl_alg_kind_t | alg_kind, | ||
const dnnl_memory_desc_t * | data_desc, | ||
float | alpha, | ||
float | beta | ||
) |
Initializes an eltwise_desc
for forward propagation using prop_kind
(possible values are dnnl_forward_training and dnnl_forward_inference), alg_kind
algorithm, memory descriptor data_desc
, alpha
, and beta
parameters.
Inputs:
Outputs:
dnnl_status_t DNNL_API dnnl_eltwise_backward_desc_init | ( | dnnl_eltwise_desc_t * | eltwise_desc, |
dnnl_alg_kind_t | alg_kind, | ||
const dnnl_memory_desc_t * | diff_data_desc, | ||
const dnnl_memory_desc_t * | data_desc, | ||
float | alpha, | ||
float | beta | ||
) |
Initializes an eltwise_desc
for backward propagation using alg_kind
algorithm memory descriptors diff_data_desc
and data_desc
, and the alpha
and beta
parameters.
Inputs:
Outputs: