relu_prime

relu_prime(x: numpy.ndarray) → numpy.ndarray

Derivation of the relu activation function.

derivation:

f’(x) = 0 if x < 0

f’(x) = 1 if x > 0

Parameters

x (Tensor) – input to the function

Returns

f’(x), applies derivation of activation function

Return type

Tensor