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

class reprsenting Soft Max activation function, since the definition is to complex for activation function it derives from Layer More...

#include <SoftMax.hpp>

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

Public Member Functions

 SoftMax (std::size_t in=0)
 Construct a new SoftMax object.
 
vectorOut forward (vectorIn) override
 softmax definition
 
vectorIn backward (vectorOut) override
 derived version of softmax
 
void fit (float_t learning_rate) override
 This does nothing, since softmax doesnt change.
 
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 reprsenting Soft Max activation function, since the definition is to complex for activation function it derives from Layer

Constructor & Destructor Documentation

◆ SoftMax()

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

Construct a new SoftMax object.

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

Member Function Documentation

◆ backward()

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

derived version of softmax

Implements mlask::Layer.

◆ fit()

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

This does nothing, since softmax doesnt change.

Implements mlask::Layer.

◆ forward()

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

softmax definition

Implements mlask::Layer.

◆ str()

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

Returns a string representation of the layer.

Reimplemented from mlask::Layer.

◆ tryConvertToONNX()

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