Created
August 20, 2019 00:16
-
-
Save luiscarbonell/83288c1993bb0676aa426adb6b8e571d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Train Network (10,000 Iterations) | |
train(10000); | |
// Test Network | |
console.log(activate([0,0])); // ~0 (0.01214291222508886) | |
console.log(activate([0,1])); // ~0 (0.08100696632854297) | |
console.log(activate([1,0])); // ~0 (0.07793351045035582) | |
console.log(activate([1,1])); // ~1 (0.8780115291725155) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey, really appreciate your article on Medium for this, I think I finally actually understand whats going on for the most part. I do have 1 problem with the code from your tutorial series in that rather than receiving results such that you have here, I'm getting 0.25... consistently for all of the 4 different inputs. I noticed that the code had some inconsistencies between different sections of source code in the tutorial (i.e. Neuron.incoming.neurons later changing to Neuron.incoming.targets). Would you be able to post a single copy of the full source that successfully outputs the correct results like you are receiving here in this file? Thanks!