/nobrainer

Basic neural network library for educational purposes

Primary LanguagePythonMIT LicenseMIT

nobrainer

Build Status
Code style: black

data = [[[0, 0, 1],0],
        [[0, 1, 1],1],
        [[1, 0, 1],1],
        [[0, 1, 0],1],
        [[1, 0, 0],1],
        [[1, 1, 1],0],
        [[0, 0, 0],0]]

nn = nobrainer.DeepNetwork(data,2,4)
nn.train(60000)

print(nn.think([1, 1, 0]))
[ 0.0078876]

Heavily inspired by Milo Spencer-Harper's excellent article here.