Skip to content

A small and modular Neural Networks library for C programs

License

Notifications You must be signed in to change notification settings

IltonPfleger/NeuroPulse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NeuroPulse

C LICENSE ML PULSE

About The Project

The aim of this project is to create a user-friendly Neural Networks library for the C programming language. The library should be easy for users to understand and modify. The core concept is to make everything modular, enabling users to adapt architectures to solve their problems.

Features

  • Stochastic Gradient Descent.
  • Batch Gradient Descent.
  • Mini-Batch Gradient Descent.
  • Custom Activation Functions Per Layer.
  • Convolutional Layers.
  • RNN Features.
  • Optimizers like RMSProp, Adam, etc.
  • Custom Error Functions.

Example

#include <stdlib.h>
#include <stdio.h>
#include "Include/PULSE.h"

int main()
{
	PULSE_DATA x[4][2] = {{0, 1}, {1, 1}, {1, 0}, {0, 0}};
	PULSE_DATA y[4][1] = {{1}, {0}, {1}, {0}};

	pulse_layer_t * model = PULSE_CreateModel(2,
			PULSE_DENSE, (PULSE_ARGS_DENSE){2, 128, PULSE_ACTIVATION_RELU, PULSE_OPTIMIZATION_NONE},
			PULSE_DENSE,(PULSE_ARGS_DENSE){128, 1, PULSE_ACTIVATION_RELU, PULSE_OPTIMIZATION_NONE});

	pulse_train(model, 15000, 4, (PULSE_HyperArgs){2, 0.1}, PULSE_LOSS_MSE, (PULSE_DATA*)x, (PULSE_DATA*)y);

	printf("TRAIN RESULT\n");
	for (int i = 0; i < 4; i++)
	{
		printf("Entrada: %d %d, Output: %f\n", (int)x[i][0], (int)x[i][1], pulse_foward(model, x[i])[0]);
	}
	PULSE_Destroy(model);
}

Notes:

  • The project requires C standard libraries. If using non-compiled files, include them in your compilation.

  • Feel free to send ideas, suggestions, questions, and requests.