![]()  | 
  
    AIfES 2
    2.0.0
    
   | 
 
General ReLU layer struct. More...
#include <ailayer_relu.h>
Data Fields | |
| ailayer_t | base | 
| Inherited field members from general ailayer struct.  | |
Math functions  | |
Required data type specific math functions  | |
| void(* | relu )(const aitensor_t *x, aitensor_t *result) | 
| Required math function: ReLU.  More... | |
| void(* | d_relu )(const aitensor_t *x, aitensor_t *result) | 
| Required math function: Derivative of ReLU.  More... | |
| void(* | multiply )(const aitensor_t *a, const aitensor_t *b, aitensor_t *result) | 
| Required math function: Element wise tensor multiplication.  More... | |
General ReLU layer struct.
| void(* d_relu) (const aitensor_t *x, aitensor_t *result) | 
Required math function: Derivative of ReLU.
Requires a math function that calculates the element wise ReLU derivative of a tensor:
 
\[ result_{i} = \begin{cases} 0 & \text{if } x_i < 0\\ 1 & \text{if } x_i \geq 0 \end{cases} \]
| x | N-dimensional tensor (input) | 
| result | N-dimensional tensor (output) | 
| void(* multiply) (const aitensor_t *a, const aitensor_t *b, aitensor_t *result) | 
Required math function: Element wise tensor multiplication.
Requires a math function that multiplies two tensors element wise:
 
\[ result = a \circ b \]
| void(* relu) (const aitensor_t *x, aitensor_t *result) | 
Required math function: ReLU.
Requires a math function that calculates the element wise ReLU of a tensor:
 
\[ result_{i} = max(0, x_{i}) \]
| x | N-dimensional tensor (input) | 
| result | N-dimensional tensor (output) |