GithubHelp home page GithubHelp logo

rohanvdvivedi / neural-network Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 28 KB

This is a small attempt to build a Neural Network Library for easy of use in c

C 94.06% C++ 2.28% Objective-C 3.65%

neural-network's Introduction

Neural-Network

This is a small attempt to build a Neural Network Library for easy of use in c

This library has been developed by me , and is a crude attempt to program a neural net library in c

It has to be noted that the library has only online learning , with a constant learning rate learning

it can be used to make different neural net architectures, using very simple functions

the only thing that is left to the user is to define his/her own activation functions, although ELU, RELU, IDENTITY, TANH and LOGISTIC and LOGADAPT (my very own self define activation function), etc have been defined they can be added by declaring and defining them in activationfunctions.h and activationfunctions.c files

also another task that is left to the user is to defien their own cost function gradient, for their neural net

in my example logic.c i have used log cost function derivative defined as costgrad note : you need to define the gradient of the cost function you use not the cost function example i used -y*log(x) - (1-y)*log(1-x) so i defined its derivative in costgrad

Up to my knowledge ther have been no bugs notices, read the logic.c it can emulate small 2 bit logic functions if programmed i have the training set synthetically generated, in trainingsetlogic.txt

read the sample,

init_neuralnet -> you pass inputs regarding the architecture of the neuralnet to make it like the way you want

feedforward -> calculated output

update_costfunction_gradient -> update the loss gradient only for the last layer

backpropogate -> finds all weight derivatives and output error gradients at all level and adds current change to all all weight and bias change

update_weight -> updates the weight with changes generated by backpropogation

this functions have to be called in the same sequence as asked to

in the end delete the neural net

the vector files namely vector.h and vector.c are the files whose sources can be vectorized to get better performance but i lack GPU programming knowledge so is left up to someone to contribute untill then

If the PROJECT was in anyway usefull to you, do let me know with a treat

neural-network's People

Contributors

rohanvdvivedi avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.