Consider a neural network with two inputs, one output, and one hidden layer used for implementing a NOT gate. The weights of the connections between the input and hidden layers are w1 = 0.5 and w2 = -0.2, and the weight of the connection between the hidden and output layers is ws = -1.0. The bias term for each neuron is set to bias = -0.5. What is the output of the network for the input (0, 1)? [Assume a step activation function that outputs 1 if the input is positive and 0 if it is negative]
33 views
- 1
- 0 (Correct Answer)
- Any of above
- None
Explanation
When the input to the neural network is (0, 1), the output of the neuron in the hidden layer is:
h = activation(w1 * x1 + w2 * x2 + bias) = activation(0.5 * 0 + (-0.2) * 1 + (-0.5)) = activation(-0.7) = 0
Since the input to the step function is negative, the output is 0. This value is then used to calculate the output of the neuron in the output layer as follows:
y = activation(ws * h + bias) = activation((-1.0) * 0 + (-0.5)) = activation(-0.5) = 0