← Quiz: Neural Networks from Scratch: all 10 questions
Quiz: Neural Networks from Scratch · Question 7 of 10
What does this print? (code)
What does this print?
import numpy as np
X = np.ones((4, 2))
W1 = np.ones((2, 3))
W2 = np.ones((3, 1))
print((X @ W1 @ W2).shape)
- A.(2, 3)
- B.(4, 3)
- C.(3, 1)
- D.(4, 1)
Answer & explanation
Correct answer: (4, 1)
4 rows × 2 inputs → 3 hidden values each → 1 output each.
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 →