class documentation
A Simple 1D layer
A Dense layer is a simple 1D layer that just has a given number of neurons. Its the most common and basic layer.
- Attributes
- size: The number of neurons in the layer bias: An array of bias values for a neuron activation: The activation function to apply to this layer output: An array of output values after applying activation function
Method | __init__ |
Constructor for Dense Layer |
Method | build |
Overidden Build method |
Method | compute |
Method to perform computation on data |
Instance Variable | activation |
Activation function used by the layer |
Instance Variable | activation |
The name of the activation function |
Instance Variable | bias |
Bias values of the layer |
Instance Variable | leakyrelu |
Slope value if using leakyrelu activation function |
Instance Variable | midway |
Output value before applying avtivation function |
Instance Variable | output |
Output matrix of the layer |
Instance Variable | size |
Size of the layer |
Inherited from BaseLayer
:
Instance Variable | error |
Error values of the layer |
Instance Variable | is |
has the layer been built and compiled |
Instance Variable | name |
Name of the layer |
Instance Variable | trainable |
Is the layer trainable |
Method to perform computation on data
This method accepts an input vector that is the output vector of the previous layer in the network. Then output values of this layer is calculated.
The input values are simply added with the bias and then passed through the activation function.
- Args
- input:
- The input vector
- Returns
- The output vector after computaion