MLask 1.0.0
A custom c++ deep learning library
Loading...
Searching...
No Matches
Public Member Functions | List of all members
mlask::ActivationFunction Class Referenceabstract

base class for Activation Functions, meant for simplicity in definition. More...

#include <ActivationFunction.hpp>

Inheritance diagram for mlask::ActivationFunction:
Inheritance graph
[legend]
Collaboration diagram for mlask::ActivationFunction:
Collaboration graph
[legend]

Public Member Functions

vectorOut forward (vectorIn) override
 Defines a way to move forward in a neural network.
 
vectorIn backward (vectorOut) override
 Defines a way to backpropagate error in backropagation algorithm.
 
void fit (float_t learning_rate) override
 Describes how the layer 'learns', meaning it defines how layer updates itself.
 
std::string str () const override
 Returns a string representation of the layer.
 
- Public Member Functions inherited from mlask::Layer
std::size_t getIn () const
 
std::size_t getOut () const
 
virtual ~Layer ()=default
 
virtual bool tryConvertToONNX (onnx::GraphProto *graph, std::string input, std::string output) const
 Converts the layer to ONNX format. If the layer cannot be converted, it should return false.
 

Additional Inherited Members

- Protected Attributes inherited from mlask::Layer
std::size_t in_
 
std::size_t out_
 

Detailed Description

base class for Activation Functions, meant for simplicity in definition.

it strips children from fit method override must and also make it easy to define forrward and backward passes via activate and derived functions that act on a single value, rather than entire vector.

Member Function Documentation

◆ backward()

vectorIn mlask::ActivationFunction::backward ( vectorOut  error)
overridevirtual

Defines a way to backpropagate error in backropagation algorithm.

Implements mlask::Layer.

◆ fit()

void mlask::ActivationFunction::fit ( float_t  learning_rate)
inlineoverridevirtual

Describes how the layer 'learns', meaning it defines how layer updates itself.

Implements mlask::Layer.

◆ forward()

vectorOut mlask::ActivationFunction::forward ( vectorIn  input)
overridevirtual

Defines a way to move forward in a neural network.

Implements mlask::Layer.

◆ str()

std::string mlask::ActivationFunction::str ( ) const
inlineoverridevirtual

Returns a string representation of the layer.

Reimplemented from mlask::Layer.

Reimplemented in mlask::LeakyRelu, mlask::Relu, mlask::Sigmoid, and mlask::Tanh.


The documentation for this class was generated from the following files: