Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Homework # 4
Due date: Nov.4, 2019
(Points 15)
2. Neural Networks - Cost Function - Let us define a NN with softmax output layer
and {oi }M M
i=1 and {yi }i=1 denote the input and targets to the NN. The task is classification
with hard targets y ∈ B C×1 , where B denotes boolean variable (0 or 1), and C is the
number of classes. Note that every data point oi is associated with only one class label
ci where ci ∈ {1, 2, .., C} classes. The output of the network is denoted as vi where
vi = {vi1 , vi2 , .., viC } ∈ RC×1 and 0 < vi < 1. The NN cost function can defined using
mean square error (MSE).
M
X
JM SE = ||vi − yi ||2
i=1
(Points 15)
3. Azhar is doing his MLSP course assignment where he is asked to implement the back-
propagation algorithm. He chooses a single hidden layer feedforward neural network (NN)
with tanh activation function.
ea − e−a
g(a) = tanh(a) =
ea + e−a