turned into this by convolutional networks
https://auduno.github.io/2016/06/18/peeking-inside-convnets/
At the same time covering Convolutional Networks
// Initial weights
let w0 = 3, w1 = -4, w2 = 2;
function perceptron(x1, x2) {
const sum = w0 + w1 * x1 + w2 * x2;
return sigmoid(sum);
}
# activation function
function sigmoid(z) {
return 1 / (1 + Math.exp(z * -1));
}
percepton training visualization (initial version provided as a courtesy of Jed Borovik)
https://en.wikipedia.org/wiki/Feedforward_neural_network
Using the Tensorflow Playground
one layer of 3 neurons
x and y coordinate of a spot in our example
Just a single layer containing 3 neurons
This is the linear classification of the lowest neuron
combining all lines to determine two categories: blue or orange?
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:3, activation: 'sigmoid'},
{type:'softmax', num_classes:2}
];
net = new convnetjs.Net();
net.makeLayers(layer_defs);
trainer = new convnetjs.Trainer(net);
{type:'softmax', num_classes:2}
Can separate categories if they are linearly separable
{type:'fc', num_neurons:3, activation: 'sigmoid'}
Has to transform original space into something that is linearly separable
Uses deep network with more than one hidden layer
Uses deep network with more than one hidden layer
Does not classify, but tries to find a coninuous function that goes through all data points
Quick Quiz: How many neurons in hidden layer?
layer_defs = [
{type:'input', out_sx:1, out_sy:1, out_depth:1},
{type:'fc', num_neurons:5, activation:'sigmoid'},
{type:'regression', num_neurons:1}];
Output layer no longer does classification, but regression
uses convolutional hidden layers
Tiny images in 10 classes, 6000 per class in training set
Udacity Course 730, Deep Learning (L3 Convolutional Neural Networks > Convolutional Networks)
// 16 5x5 filters will be convolved with the input
// output again 32x32 as stride (step width) is 1
// 2 pixels on each edge will be padded with 0 matching 5x5 pixel filter
{type:'conv', sx:5, filters:16, stride:1, pad:2, activation:'relu'}
convolutional layers remove noise, add semantics
// perform max pooling in 2x2 non-overlapping neighborhoods
// output will be 16x16 as stride (step width) is 2
{type:'pool', sx:2, stride:2}),
pooling layers in between provide translation invariance, i.e. it does not matter where in the image the object is
{type:'softmax', num_classes:10}
assigns a probability to each of the 10 categories