Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing colors to rainbow colors #104

Open
wants to merge 86 commits into
base: xor
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
2d9b40a
Merge pull request #1 from CodingTrain/master
Maik1999 Feb 5, 2018
7edb855
Fixed typo
mikaelsouza Feb 7, 2018
5ecde14
Coding Challenge: the "Hello World" of NN - handwritten number recogn…
JonasFovea Feb 7, 2018
d39fc16
Fix video repo link
philaturner Feb 7, 2018
fa362fb
Moved the To-Do list in the README
mdatsev Feb 7, 2018
30c6790
Merge pull request #35 from JonasFovea/patch-1
shiffman Feb 8, 2018
e688e95
Merge branch 'master' into patch-1
shiffman Feb 8, 2018
0ae8a0d
Merge pull request #31 from mikaelsouza/patch-1
shiffman Feb 8, 2018
f75b0ea
Merge branch 'master' into patch-2
shiffman Feb 8, 2018
c5f6f1c
Merge pull request #36 from philaturner/patch-2
shiffman Feb 8, 2018
59509bd
Adding to README the CircleCi Build Status.
narchontis Feb 8, 2018
d65aba1
Merge pull request #39 from narchontis/patch-1
shiffman Feb 8, 2018
91625d1
Updated To-Do List
mdatsev Feb 8, 2018
ddc159e
merge
mdatsev Feb 8, 2018
d9a34e4
Merge pull request #37 from mdatsev/master
shiffman Feb 8, 2018
1fcd1cc
Merge pull request #2 from CodingTrain/master
Maik1999 Feb 9, 2018
8e0057c
Added error for elemntwise addition, subbtraction and hadamard produc…
Feb 9, 2018
b59d427
Give frame work to add additional activation functions
schrummy14 Feb 9, 2018
1ac89ae
new mnist example
shiffman Feb 9, 2018
f181c5c
Merge branch 'master' into mnist
shiffman Feb 9, 2018
1410e5f
Merge pull request #46 from CodingTrain/mnist
shiffman Feb 9, 2018
a3ab00c
Only show guess if there's a user drawing
AlcaDesign Feb 9, 2018
2d5b3d2
Alter how mnist files are loaded
meiamsome Feb 9, 2018
4957d96
Merge branch 'master' into added-error-handling
shiffman Feb 9, 2018
c081d38
Merge branch 'master' into patch-1
shiffman Feb 9, 2018
b3ce7d3
Merge pull request #43 from Maik1999/added-error-handling
shiffman Feb 9, 2018
e57a6f2
Merge branch 'master' into patch-1
shiffman Feb 9, 2018
cfae556
Merge branch 'master' into master
shiffman Feb 9, 2018
5b46ce3
Merge pull request #48 from meiamsome/master
shiffman Feb 9, 2018
0a44090
Merge branch 'master' into patch-1
AlcaDesign Feb 9, 2018
be04a3f
Move select into setup
AlcaDesign Feb 9, 2018
f876f65
Add .gitattributes for Windows compatibility and add Emacs junk to .g…
Versatilus Feb 9, 2018
c00678a
Merge branch 'master' into pr-gitattributes
Versatilus Feb 9, 2018
300b427
Merge branch 'master' into patch-1
schrummy14 Feb 10, 2018
07d81b3
Added de- and serialization functions.
enginefeeder101 Feb 10, 2018
b33a97d
Merge pull request #47 from AlcaDesign/patch-1
shiffman Feb 10, 2018
7e69f68
Merge branch 'master' into savestate
shiffman Feb 10, 2018
37051d9
Merge pull request #50 from enginefeeder101/savestate
shiffman Feb 10, 2018
47b4423
Merge branch 'master' into pr-gitattributes
shiffman Feb 10, 2018
efc8aec
Merge pull request #49 from Versatilus/pr-gitattributes
shiffman Feb 10, 2018
87f12e7
Merge branch 'master' into patch-1
shiffman Feb 10, 2018
07b072b
Update README.md
shiffman Feb 10, 2018
b147cba
Merge pull request #45 from schrummy14/patch-1
shiffman Feb 10, 2018
bc86d80
Merge branch 'master' into shiffman-patch-2
shiffman Feb 10, 2018
08e188d
Merge pull request #51 from CodingTrain/shiffman-patch-2
shiffman Feb 10, 2018
aa33ad8
Update README.md
shiffman Feb 10, 2018
57ff0da
Merge pull request #55 from CodingTrain/shiffman-patch-3
shiffman Feb 10, 2018
a6b03ad
User Input needs to be normalized
papalotis Feb 11, 2018
8f4c76d
Add links to demos running in GitHub Pages
enginefeeder101 Feb 11, 2018
a267379
Show links in a list.
enginefeeder101 Feb 11, 2018
10b49a5
Updated p5.js to v0.6.0, removed unused sound lib and deleted local libs
enginefeeder101 Feb 11, 2018
1ceadaa
Merge pull request #3 from CodingTrain/master
Maik1999 Feb 11, 2018
11c6d98
Add MIT license file
enginefeeder101 Feb 11, 2018
e604173
Merge pull request #60 from enginefeeder101/MIT
shiffman Feb 11, 2018
185f92d
Merge branch 'master' into pages
shiffman Feb 11, 2018
3e5ef5f
Merge pull request #58 from enginefeeder101/pages
shiffman Feb 11, 2018
7b165d5
Merge branch 'master' into patch-1
shiffman Feb 11, 2018
eacfdf0
Merge pull request #57 from papalotis/patch-1
shiffman Feb 11, 2018
7ed5b8c
Merge branch 'master' into p5fix
enginefeeder101 Feb 11, 2018
e2d8cea
Added local libraries for p5.js v0.6.0
enginefeeder101 Feb 11, 2018
43f5ab9
Merge pull request #59 from enginefeeder101/p5fix
shiffman Feb 11, 2018
871e5b5
Merge pull request #4 from CodingTrain/master
Maik1999 Feb 11, 2018
4b06127
manage activation function in a class
Feb 11, 2018
5f9555b
added tanh
Feb 11, 2018
0a97778
Update README.md
shiffman Feb 11, 2018
ca8b90d
Merge pull request #63 from CodingTrain/shiffman-patch-4
shiffman Feb 11, 2018
b728f5a
Merge branch 'master' into activation-function-class
shiffman Feb 11, 2018
bfc0be8
Merge pull request #62 from Maik1999/activation-function-class
shiffman Feb 11, 2018
2dc6b2b
Update README.md
shiffman Feb 11, 2018
a20aa4a
Added links to the mentioned pull requests
Maik1999 Feb 11, 2018
60a0319
Merge pull request #67 from Maik1999/patch-1
shiffman Feb 11, 2018
88bae36
Made build badge clickable
rhbvkleef Feb 16, 2018
bd12277
Merge pull request #81 from rhbvkleef/clickable-build-badge
shiffman Feb 17, 2018
fcacc8d
Added link to pull request 62
Maik1999 Feb 25, 2018
01784f9
Merge pull request #87 from Maik1999/patch-2
shiffman Feb 25, 2018
d641c86
adding new doodle classifier example
shiffman Mar 2, 2018
7615757
Create README.md
shiffman Mar 6, 2018
c8ae50a
adding new neuro-evolution example
shiffman Mar 9, 2018
846a259
Adding code from March 9 live stream
shiffman Mar 9, 2018
03718ae
Add Matrix copy() test
enginefeeder101 Mar 10, 2018
e713dff
Merge pull request #99 from enginefeeder101/copytest
shiffman Mar 10, 2018
3622343
Create a README in the xor example
jonathan-richer Mar 21, 2018
20bc3db
Update the structure of the README file
jonathan-richer Mar 22, 2018
4dd37fa
Merge pull request #103 from codeMeHtm/patch-2
shiffman Mar 24, 2018
f44dbd9
Making the colors rainbow colors!
jonathan-richer Mar 24, 2018
80bfe0b
Changing most of the let keywords for const
jonathan-richer Jun 29, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 4 additions & 13 deletions examples/xor/sketch.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
let nn;
let lr_slider;

let training_data = [{
et training_data = [{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like you accidentally deleted the 'l' off of "let" right here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably, I will fix this... thank you!

inputs: [0, 0],
outputs: [0]
},
Expand All @@ -18,25 +17,20 @@ let training_data = [{
outputs: [0]
}
];

function setup() {
createCanvas(400, 400);
nn = new NeuralNetwork(2, 4, 1);
lr_slider = createSlider(0.01, 0.5, 0.1, 0.01);

colorMode(HSB);
}

function draw() {
background(0);

for (let i = 0; i < 10; i++) {
let data = random(training_data);
nn.train(data.inputs, data.outputs);
}

nn.setLearningRate(lr_slider.value());

let resolution = 10;
let resolution = 5;
let cols = width / resolution;
let rows = height / resolution;
for (let i = 0; i < cols; i++) {
Expand All @@ -46,11 +40,8 @@ function draw() {
let inputs = [x1, x2];
let y = nn.predict(inputs);
noStroke();
fill(y * 255);
fill(y * 360, 100, 100);
rect(i * resolution, j * resolution, resolution, resolution);
}
}



}