Training Example x1
x2 Class
a. 0 1 –1 b. 2 0 –1 c. 1 1 +1
w0 = –1.5In your answer, you should clearly indicate the new weight values at the end of each training step. The first three steps are shown here:
w1 = 0
w2 = 2
Iteration
w0 w1 w2
Training Example
x1 x2 Class
s=w0+w1x1+w2x2
Action 1 –1.5 0 2
a. 0 1 –
+0.5 Subtract 2 –2.5 0 1
b. 2 0 –
–2.5 None 3 –2.5 0 1
c. 1 1 +
–1.5 Add
Continue the table until all items are correctly classified.
Recall that any logical function can be converted into Conjunctive Normal Form (CNF), which means a conjunction of terms where each term is a disjunction of (possibly negated) literals. This is an example of an expression in CNF:
(A ∨ B) ∧ (¬ B ∨ C ∨ ¬ D) ∧ (D ∨ ¬ E)Assuming False=0 and True=1, explain how each of the following could be constructed. You should include the bias for each node, as well as the values of all the weights (input-to-output or input-to-hidden and hidden-to-output, as appropriate).
With reference to this example, explain how a two-layer neural network could be constructed to compute any (given) logical expression, assuming it is written in Conjunctive Normal Form.
Hint: first consider how to construct a Perceptron to compute the OR function of m inputs, with k of the m inputs negated.
Construct by hand a Neural Network (or Multi-Layer Perceptron) that computes the XOR function of two inputs. Make sure the connections, weights and biases of your network are clearly visible.
Challenge:
Can you construct a Neural Network to compute XOR which has only one
hidden unit, but also includes shortcut connections from the two
inputs directly to the (one) output?
Hint: start with a network that computes the inclusive OR, and then try to think of how it could be modified.
Checkpoints are designed to make sure you are keeping up with weekly tasks and consistently taking actions to learn the technical material, and the skills required for the successful completion of the assignment and the group project. Each checkpoint is worth 1% of your final grade. You will need to show your work to your tutor during the tutorial or mentoring session to get the weekly checkpoint mark.
In the last 45 minutes of the Week 1 Tutorial, you will work on refreshing Python and learning basics of NumPy Arrays and PyTorch Tensors, by following these links:
What potential benefits and dangers might Deep Learning pose for education, entertainment, the economy, and society in general?