NNFS
Neural network library from scratch
Loading...
Searching...
No Matches
Activation.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "../Layer/Layer.hpp"
4
5namespace NNFS
6{
10 enum class ActivationType
11 {
12 RELU,
13 SIGMOID,
14 TANH,
15 SOFTMAX,
16 NONE
17 };
23 class Activation : public Layer
24 {
25 public:
26 ActivationType activation_type; // Type of activation function
27
28 public:
35
36 protected:
37 Eigen::MatrixXd _forward_input; // Input data for forward pass
38 };
39} // namespace NNFS
Base class for all activation functions.
Definition Activation.hpp:24
ActivationType activation_type
Definition Activation.hpp:26
Eigen::MatrixXd _forward_input
Definition Activation.hpp:37
Activation(ActivationType activation_type)
Construct a new Activation object.
Definition Activation.hpp:34
Base class for all layers.
Definition Layer.hpp:23
Definition Activation.hpp:6
LayerType
Enum class for layer types.
Definition Layer.hpp:12
ActivationType
Enum class for activation types.
Definition Activation.hpp:11