2 #include <dlprim/tensor.hpp> 3 #include <dlprim/context.hpp> void activation_forward(Tensor &x, Tensor &y, StandardActivations activation, ExecutionContext const &ec)
Appliy activation on X save to Y, Y can be same as X.
void activation_backward(Tensor &dx, Tensor &dy, Tensor &y, StandardActivations activation, float factor, ExecutionContext const &ec)
Backward aclivation computed dx = dx * factor + backward(y,dy)
Mane namespace.
Definition: context.hpp:9
StandardActivations
Parameterless Activations that can be embedded to general kernels like inner product or convolution...
Definition: definitions.hpp:266