Skip to content

djlad/lightneuralnetwork

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lightneuralnetwork

small neural network library written in python.

Uses backpropagation and gradient descent to adjust weights

usage:

git clone url

import lightneuralnetwork
#and gate inputs
example_inputs = [
    [0, 0],
    [0, 1],
    [1, 0],
    [1, 1]
]
#and gate outputs
example_outputs = [
    [0],
    [0],
    [0],
    [1]
]

example_set = [example_inputs, example_outputs]
#create neural network with 2 inputs, 12 hidden nodes, 1 output
net = lightneuralnetwork.Net([2, 12, 1], example_set)
#run with inputs [1, 0] and [0, 0]
net.run([[1,0], [0,0]])
#train with example_set
net.train()
#check examples.py for more details

run tests:

cd lightneuralnetwork/src

./runtests.bat

About

small neural network library written in python.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published