Oliver Zeigermann / @DJCordhose
http://djcordhose.github.io/machine-learning-in-the-browser/2016_ruhrjs.html
http://playground.tensorflow.org/
http://www.theprojectspot.com/tutorial-post/introduction-to-artificial-neural-networks-part-1/7
http://cs.stanford.edu/people/karpathy/convnetjs/
Code can be changed directly in the browser
That's what you can change directly in the browser
layer_defs = [
{type:'input', out_sx:1, out_sy:1, out_depth:2},
{type:'fc', num_neurons:6, activation: 'tanh'},
{type:'fc', num_neurons:2, activation: 'tanh'},
{type:'softmax', num_classes:2}
];
net = new convnetjs.Net();
net.makeLayers(layer_defs);
trainer = new convnetjs.Trainer(net);
Under the hood
var point = new convnetjs.Vol(1,1,2); // needs to match input layer
point.w = [3.0, 4.0];
var prediction = net.forward(point);
// probability of classes in .w
if(prediction.w[0] > prediction.w[1]) // red / orange;
else // green / blue;
Predictions will be painted as background colors
// data coordinates
var data = [[-0.4326, 1.1909], [3.0, 4.0], [1.8133, 1.0139 ]];
// matching labels, 1 for red / orange, 0 for green / blue
var labels = [1, 1, 0];
var N = labels.length;
var avloss = 0.0;
for (var iter=0; iter < 20; iter++) {
for (var ix=0; ix < N; ix++) {
var point = new convnetjs.Vol(1,1,2);
var label = labels[ix];
point.w = data[ix]; // use data coordinate for point
var stats = trainer.train(point, label);
avloss += stats.loss;
}
}
// make this as small as possible
avloss /= N*iters;
Convnetjs uses stochastic gradient descent (SGD) by default
Udacity Course 730, Deep Learning (L3 Convolutional Neural Networks > Convolutional Networks)
becomes
https://auduno.github.io/2016/06/18/peeking-inside-convnets/
Oliver Zeigermann / @DJCordhose
http://djcordhose.github.io/machine-learning-in-the-browser/2016_ruhrjs.html