MLask 1.0.0
A custom c++ deep learning library
Loading...
Searching...
No Matches
SoftMax.hpp
Go to the documentation of this file.
1#pragma once
2#include "Layer.hpp"
3
4namespace mlask{
5
8 vectorIn input_;
9 vectorOut forwardOutput_;
10public:
13 SoftMax(std::size_t in = 0);
14
16 vectorOut forward(vectorIn)override;
20 void fit(float_t learning_rate)override{}
21
27 bool tryConvertToONNX(onnx::GraphProto* graph, std::string input, std::string output) const override;
28 std::string str() const override{ return "SoftMax"; }
29};
30
31}
Base class for all layers in the neural network.
Definition Layer.hpp:10
class reprsenting Soft Max activation function, since the definition is to complex for activation fun...
Definition SoftMax.hpp:7
SoftMax(std::size_t in=0)
Construct a new SoftMax object.
std::string str() const override
Returns a string representation of the layer.
Definition SoftMax.hpp:28
void fit(float_t learning_rate) override
This does nothing, since softmax doesnt change.
Definition SoftMax.hpp:20
bool tryConvertToONNX(onnx::GraphProto *graph, std::string input, std::string output) const override
Try to convert the layer to ONNX format.
vectorIn backward(vectorOut) override
derived version of softmax
Definition SoftMax.cpp:13
vectorOut forward(vectorIn) override
softmax definition
Definition SoftMax.cpp:6
Definition LeakyRelu.hpp:4
Eigen::Matrix< float_t, Eigen::Dynamic, 1 > vectorOut
Definition types.hpp:17
float float_t
Definition types.hpp:12
Eigen::Matrix< float_t, Eigen::Dynamic, 1 > vectorIn
Definition types.hpp:16