88#define nn_output(nn) (nn).as[(nn).layer_count]
A simple calculus library header.
A simple linear algebra library header.
void nn_update_weights(nn_neural_network nn)
Update the weights and biases of the neural network.
void nn_backpropagation(nn_neural_network nn, la_matrix y)
Perform backpropagation to compute gradients.
void nn_fit(nn_neural_network nn, la_matrix X, la_matrix y, la_matrix y_pred)
Train the neural network using the given dataset.
void nn_fprint(nn_neural_network nn, FILE *fp)
Print the details of the neural network to a file.
struct nn_neural_network nn_neural_network
Structure representing a neural network.
nn_neural_network nn_alloc(size_t *arch, size_t layer_count, calc_function activation, double learning_rate)
Allocate and initialize a neural network.
double nn_calculate_cost(la_matrix y, la_matrix y_pred, la_matrix cost)
Calculate the cost of the neural network's predictions.
void nn_forward(nn_neural_network nn, la_matrix input)
Perform a forward pass through the neural network.
Structure representing an function and its derivative.
Structure representing a matrix.
Structure representing a neural network.