From the course: Training Neural Networks in C++
Unlock the full course today
Join today to access over 23,900 courses taught by industry experts.
Challenge: Finish the perceptron - C++ Tutorial
From the course: Training Neural Networks in C++
Challenge: Finish the perceptron
(upbeat music) - [Instructor] Ready for your first challenge? Let's finish up the Perceptron class. In order to test the class, we will need to be able to set the weights at specific values. So we need the set_weights function you see at line 24. And remember, we will use a sigmoid as the activation function. So that's the second thing you'll have to write starting at line 28. So once again, your task is to write two member functions, the sigmoid activation function and a separate function to write values to the weights. For the argument, receive a vector of doubles. You may or may not validate that the length of this vector matches the number of inputs in the neuron, including the bias. This is not crucial because we will use it for simple tests. This should take you about 15 minutes. When you are done, let me show you my solution in the next video.
Contents
-
-
-
-
Neurons and the brain1m 49s
-
(Locked)
A simple model of a neuron5m 43s
-
(Locked)
Activation functions6m 21s
-
(Locked)
Perceptrons: A better model of a neuron6m 32s
-
(Locked)
Challenge: Finish the perceptron1m 7s
-
(Locked)
Solution: Finish the perceptron46s
-
(Locked)
Logic gates3m 54s
-
(Locked)
Challenge: Logic gates with perceptrons1m
-
(Locked)
Solution: Logic gates with perceptrons1m 6s
-
-
-
-
-