|
MLask 1.0.0
A custom c++ deep learning library
|
Base class for all layers in the neural network. More...
#include <Layer.hpp>

Public Member Functions | |
| std::size_t | getIn () const |
| std::size_t | getOut () const |
| virtual | ~Layer ()=default |
| virtual vectorOut | forward (vectorIn)=0 |
| Defines a way to move forward in a neural network. | |
| virtual vectorIn | backward (vectorOut)=0 |
| Defines a way to backpropagate error in backropagation algorithm. | |
| virtual void | fit (float_t learning_rate)=0 |
| Describes how the layer 'learns', meaning it defines how layer updates itself. | |
| 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. | |
| virtual std::string | str () const |
| Returns a string representation of the layer. | |
Protected Attributes | |
| std::size_t | in_ |
| std::size_t | out_ |
Base class for all layers in the neural network.
|
virtualdefault |
Defines a way to backpropagate error in backropagation algorithm.
Implemented in mlask::LambdaActivationFunction, mlask::FullyConnectedLayer< in, out >, mlask::SoftMax, and mlask::ActivationFunction.
Describes how the layer 'learns', meaning it defines how layer updates itself.
Implemented in mlask::SoftMax, mlask::ActivationFunction, mlask::LambdaActivationFunction, and mlask::FullyConnectedLayer< in, out >.
Defines a way to move forward in a neural network.
Implemented in mlask::LambdaActivationFunction, mlask::FullyConnectedLayer< in, out >, mlask::SoftMax, and mlask::ActivationFunction.
|
inline |
|
inline |
|
inlinevirtual |
Returns a string representation of the layer.
Reimplemented in mlask::LeakyRelu, mlask::Relu, mlask::Sigmoid, mlask::SoftMax, mlask::Tanh, mlask::ActivationFunction, and mlask::FullyConnectedLayer< in, out >.
|
inlinevirtual |
Converts the layer to ONNX format. If the layer cannot be converted, it should return false.
Reimplemented in mlask::LeakyRelu, mlask::Relu, mlask::Sigmoid, mlask::SoftMax, mlask::Tanh, and mlask::FullyConnectedLayer< in, out >.
|
protected |
|
protected |