Deep Neural Network Library (DNNL)  1.1.3
Performance library for Deep Learning
Classes

A primitive to compute element-wise operations such as rectified linear unit (ReLU). More...

Classes

struct  dnnl::eltwise_forward
 Element-wise operations for forward propagation. More...
 
struct  dnnl::eltwise_backward
 Element-wise operations for backward propagation. More...
 

Detailed Description

A primitive to compute element-wise operations such as rectified 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.

Warning
Because the original src is required for backward pass, in-place forward pass in general cannot be applied during training. However, for some kinds of element-wise operations (namely ReLU with alpha parameter equals 0), dst and src can be interchangeable for the backward pass, which enables performance of in-place forward even for training.
See also
Eltwise in developer guide
Eltwise in C API