Neural
Neural::Network Class Reference

#include <network.h>

Public Member Functions

 Network ()
 Constructor of Network class. More...
 
 Network (std::string)
 
 ~Network ()
 
void Add (Layer *layer)
 
void Fit (Eigen::MatrixXd x_train, Eigen::MatrixXd y_train, int epochs, double learning_rate, int batch_size)
 
void Use (Loss *l)
 
void Evaluate (Eigen::MatrixXd y_tests, Eigen::MatrixXd y_true)
 
std::vector< Eigen::MatrixXd > Predict (Eigen::MatrixXd input_data)
 
bool Save (std::string)
 
void Load (std::string)
 
void SetThreads (int thread)
 
int GetThreads ()
 

Constructor & Destructor Documentation

◆ Network() [1/2]

Network::Network ( )

Constructor of Network class.

◆ Network() [2/2]

Neural::Network::Network ( std::string  )

◆ ~Network()

Network::~Network ( )

Destructor -> liberate Layer memory

Member Function Documentation

◆ Add()

void Network::Add ( Layer layer)

Adding a Layer to Network

Parameters
layerThe pointer of the Layer Mother (class Layer)
Returns
void

◆ Evaluate()

void Network::Evaluate ( Eigen::MatrixXd  y_tests,
Eigen::MatrixXd  y_true 
)

◆ Fit()

void Network::Fit ( Eigen::MatrixXd  x_train,
Eigen::MatrixXd  y_train,
int  epochs,
double  learning_rate,
int  batch_size 
)

Train the network on a set of data and a set of results, this is for set the good weights and bias

Parameters
x_trainMatrix Input data
y_trainMatrix Result data
epochsNumber of iteration
learning_rateThe step size at each iteration
Returns
void

◆ GetThreads()

int Network::GetThreads ( )

◆ Load()

void Network::Load ( std::string  )

Load network state for json file, different type of Layer, Weight, Bias, and create Network from data loaded

Parameters
nameString name of file we wan't to create
Returns
void

◆ Predict()

vector< MatrixXd > Network::Predict ( Eigen::MatrixXd  input_data)

Predict data based on input data, forward propagation throughout the network

Parameters
input_dataMatrix Input data
Returns
vector<MatrixXd> The array of Matrix output res

◆ Save()

bool Network::Save ( std::string  )

Save network state in json file

Parameters
nameString name of file we wan't to create
Returns
true if Save

◆ SetThreads()

void Network::SetThreads ( int  thread)

◆ Use()

void Network::Use ( Loss l)

Adding a loss function to network

Parameters
lossThe pointer of the loss function
Returns
void

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