← Quiz: Neural Networks from Scratch: all 10 questions
Quiz: Neural Networks from Scratch · Question 3 of 10
What does this print? (code)
What does this print?
import numpy as np
z = np.array([-2.0, 0.0, 3.0])
print(np.maximum(0, z))
- A.[-2. 0. 3.]
- B.[2. 0. 3.]
- C.[0. 0. 3.]
- D.[0. 1. 1.]
Answer & explanation
Correct answer: [0. 0. 3.]
ReLU keeps positive values and turns negative values into 0.
Can you get the rest right without peeking?
Take the timed Quiz: Neural Networks from Scratch quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →