#include <network.h>
◆ Network() [1/2]
◆ Network() [2/2]
Neural::Network::Network |
( |
std::string |
| ) |
|
◆ ~Network()
Destructor -> liberate Layer memory
◆ Add()
void Network::Add |
( |
Layer * |
layer | ) |
|
◆ 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_train | Matrix Input data |
y_train | Matrix Result data |
epochs | Number of iteration |
learning_rate | The 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
-
name | String 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_data | Matrix Input data |
- Returns
- vector<MatrixXd> The array of Matrix output res
◆ Save()
bool Network::Save |
( |
std::string |
| ) |
|
Save network state in json file
- Parameters
-
name | String 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
-
loss | The pointer of the loss function |
- Returns
- void
The documentation for this class was generated from the following files: