Created
April 20, 2016 02:01
-
-
Save irfansharif/6dfd0919e7c515f2a2a5e83509e23fce 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
@dataset = [ | |
{ input: { a: 0, b: 0 }, output: { o: 0 } }, | |
{ input: { a: 0, b: 1 }, output: { o: 1 } }, | |
{ input: { a: 1, b: 0 }, output: { o: 1 } }, | |
{ input: { a: 1, b: 1 }, output: { o: 0 } } | |
] | |
@network = Cerebrum.new | |
@network.train(@dataset) | |
actual_result = @network.run({a: 1, b: 0}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment