|
FlexNN 1
Fully connected neural network built from scratch with flexible n-layer design and multiple activations.
|
Tanh activation — std::tanh forward, (1-A^2) backward. More...
#include <Eigen/Dense>#include <cmath>

Go to the source code of this file.
Namespaces | |
| namespace | FlexNN |
| Namespace for the FlexNN neural network library. | |
| namespace | FlexNN::Activations |
| namespace | FlexNN::Activations::detail |
Functions | |
| Eigen::MatrixXd | FlexNN::Activations::detail::tanh_forward (const Eigen::MatrixXd &Z) |
| Tanh forward: A = tanh(Z) elementwise. | |
| Eigen::MatrixXd | FlexNN::Activations::detail::tanh_backward (const Eigen::MatrixXd &dA, const Eigen::MatrixXd &, const Eigen::MatrixXd &A) noexcept |
| Tanh backward: dZ = dA * (1 - A^2). | |
Tanh activation — std::tanh forward, (1-A^2) backward.