🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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))
  1. A.[-2. 0. 3.]
  2. B.[2. 0. 3.]
  3. C.[0. 0. 3.]
  4. 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 →