miloharper / simple-neural-network Goto Github PK
View Code? Open in Web Editor NEWA neural network written in Python, consisting of a single neuron that uses back propagation to learn.
License: MIT License
A neural network written in Python, consisting of a single neuron that uses back propagation to learn.
License: MIT License
Hi
Thank you for sharing this code.
A note: For this to work in Python3 users need to
Viktor
I do not quite understand is that we are not getting enough correct answers to call it much of an accomplishment . . . Take this last line in the code:
output = neural_network.think(np.array([1, 0, 0]))
This is the resulting output for each corresponding input :
Input Output
0 [0, 0, 0] --> [ 0.5]
1 [1, 0, 0] --> [ 0.99993704]
2 [0, 1, 0] --> [ 0.44822538]
3 [1, 1, 0] --> [ 0.9999225]
4 [0, 0, 1] --> [ 0.009664]
5 [1, 0, 1] --> [ 0.99358931]
6 [0, 1, 1] --> [ 0.00786466]
7 [1, 1, 1] --> [ 0.99211997]
This is for the XOR function:
INPUT OUTPUT
A B A XOR B
0 0 0
0 1 1
1 0 1
1 1 0
So we need to consider . . . . are we XORing all three values or just the first two values. . . . but nevertheless, when we plug in 1, 0, 0 we get the outcome 0.99993704, . . (1), and that is correct, however, look at all the other values! 0, 2, 3, 4, 5, 6 would be wrong, using the first two or all three, and I am not sure why we would bother with the rest if only the first two digits matter. This is pretty serious,
given that only 1 and 7 give a correct answer . . .
Hi, how do I know if the result is 0 or 1 for each sample? Should I compare think method result
I am trying python and this for the first time. I installed python 2.7 and when I run the command "python main.py" I get "No module name NumPy" error
I m new to this, but just copied full code in python 3.6 and got error xrange not defined is there any input file or something needed other than just coping code down and executing?
Hello guys
Iโm getting this soon as I run
except ImportError:
msg = """Error importing numpy: you should not try to import numpy from
its source directory; please exit the numpy source tree, and relaunch
your python interpreter from there."""
raise ImportError(msg)``
Can some one give a light
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.