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

Layer representing Relu activation function. More...

#include <Relu.hpp>

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

Public Member Functions

 Relu (std::size_t in=0)
 Construct a new Relu object.
 
bool tryConvertToONNX (onnx::GraphProto *graph, std::string input, std::string output) const override
 Try to convert the layer to ONNX format.
 
std::string str () const override
 Returns a string representation of the layer.
 
- Public Member Functions inherited from mlask::ActivationFunction
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.
 
- Public Member Functions inherited from mlask::Layer
std::size_t getIn () const
 
std::size_t getOut () const
 
virtual ~Layer ()=default
 

Additional Inherited Members

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

Detailed Description

Layer representing Relu activation function.

Constructor & Destructor Documentation

◆ Relu()

mlask::Relu::Relu ( std::size_t  in = 0)

Construct a new Relu object.

Parameters
inNumber of inputs to the layer, default is 0, meaning it can be any size

Member Function Documentation

◆ str()

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

Returns a string representation of the layer.

Reimplemented from mlask::ActivationFunction.

◆ tryConvertToONNX()

bool mlask::Relu::tryConvertToONNX ( onnx::GraphProto *  graph,
std::string  input,
std::string  output 
) const
overridevirtual

Try to convert the layer to ONNX format.

Parameters
graphONNX graph to which the layer should be added
inputName of the input tensor
outputName of the output tensor
Returns
True if the conversion was successful, false otherwise

Reimplemented from mlask::Layer.


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