mirror of
https://github.com/Relintai/MLPP.git
synced 2024-11-14 10:17:18 +01:00
so
This commit is contained in:
parent
f441780e8a
commit
90f29f8a89
@ -8,6 +8,7 @@
|
|||||||
#include "LinAlg/LinAlg.hpp"
|
#include "LinAlg/LinAlg.hpp"
|
||||||
#include "Activation.hpp"
|
#include "Activation.hpp"
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
namespace MLPP{
|
namespace MLPP{
|
||||||
|
|
||||||
@ -80,7 +81,7 @@ namespace MLPP{
|
|||||||
std::vector<double> Activation::adjSoftmax(std::vector<double> z){
|
std::vector<double> Activation::adjSoftmax(std::vector<double> z){
|
||||||
LinAlg alg;
|
LinAlg alg;
|
||||||
std::vector<double> a;
|
std::vector<double> a;
|
||||||
double C = -*max_element(z.begin(), z.end());
|
double C = -*std::max_element(z.begin(), z.end());
|
||||||
z = alg.scalarAdd(C, z);
|
z = alg.scalarAdd(C, z);
|
||||||
|
|
||||||
return softmax(z);
|
return softmax(z);
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
|
|
||||||
namespace MLPP{
|
namespace MLPP{
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
#include "Utilities/Utilities.hpp"
|
#include "Utilities/Utilities.hpp"
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <algorithm>
|
||||||
#include <random>
|
#include <random>
|
||||||
|
|
||||||
namespace MLPP{
|
namespace MLPP{
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
#include "LinAlg/LinAlg.hpp"
|
#include "LinAlg/LinAlg.hpp"
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <algorithm>
|
||||||
#include <random>
|
#include <random>
|
||||||
|
|
||||||
namespace MLPP{
|
namespace MLPP{
|
||||||
|
Loading…
Reference in New Issue
Block a user