class documentation
class BaseLayer: (source)
Known subclasses: shamboflow.layers.Dense
Constructor: BaseLayer(name, trainable)
The base class for layers to inherit from.
A layer is an object that is a part of the neural network. It performs calculations on neurons or neurons present in it commonly. It can also not have computable neurons, instead can also be used to filter data from previous layers.
- Attributes
- name:
- The name of the layer
- trainable:
- Is the layer trainable
- is_built:
- Is the layer built and initialized
Method | __init__ |
Constructor for the base layer class |
Method | build |
Method to build and initialize the layer. |
Method | compute |
Method to compute various parameter |
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 | error |
Error values of the layer |
Instance Variable | is |
has the layer been built and compiled |
Instance Variable | leakyrelu |
Slope value if using leakyrelu activation function |
Instance Variable | midway |
Output value before applying avtivation function |
Instance Variable | name |
Name of the layer |
Instance Variable | output |
Output matrix of the layer |
Instance Variable | trainable |
Is the layer trainable |
overridden in
shamboflow.layers.Dense
Constructor for the base layer class
- Args
- name:
- Name of the layer
- trainable:
- Is the layer trainable. Default is True
overridden in
shamboflow.layers.Dense
Method to build and initialize the layer.
This method is to be overidden by child classes to build them by their own logic.
overridden in
shamboflow.layers.Dense
Method to compute various parameter
This method is to be implemented in inherited classes