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

Class representing Leaky Relu activation function. More...

#include <LeakyRelu.hpp>

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

Public Member Functions

 LeakyRelu (float_t a, std::size_t in=0)
 Construct a new LeakyRelu 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.
 

Detailed Description

Class representing Leaky Relu activation function.

Constructor & Destructor Documentation

◆ LeakyRelu()

mlask::LeakyRelu::LeakyRelu ( float_t  a,
std::size_t  in = 0 
)

Construct a new LeakyRelu object.

Parameters
aan a for leaky relu definition
inNumber of inputs to the layer, default is 0, meaning it can be any size

Member Function Documentation

◆ str()

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

Returns a string representation of the layer.

Reimplemented from mlask::ActivationFunction.

◆ tryConvertToONNX()

bool mlask::LeakyRelu::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: