Skip to content

lee-jun-yong/neuralnetwork-c

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

A Neural Network in C

Simple feed forward neural network in C

usage:

    make run
    # or
    make
    ./neuralnet
    # or
    gcc neuralnet.c -lm -o neuralnet && ./neuralnet

Create a neural network:

Create a network telling the size (nodes) of earch layer.

    NeuralNetwork nn;
    nn = NewNeuralNetwork(input_size, output_size, hidden_layer_size);
    // Train it
    train(nn, input_size, output_size, inputs, outputs, 10000);
    // Now, make predictions
    double foo[2] = {0, 1}; // should result in 1
    predicted = predict(nn, foo);
    printf("predicted: %f \n", predicted);
    // predicted: ~ 0.99;

About

Simple feed forward neural network in C

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 97.5%
  • Makefile 2.5%