Matrix Multiplication — the Engine of Neural Nets — Concept Check
Questions on Matrix Multiplication — the Engine of Neural Nets. Matrix multiplication is a grid of dot products that transforms a whole batch of vectors at once — it is the single most executed operation in all of deep learning.
Questions in this quiz
8 questions on Matrix Multiplication — the Engine of Neural Nets — Concept Check. Work through them here, then start the quiz to answer them and see your score.
1.You have a matrix X of shape (50, 100) and a matrix W of shape (100, 10). What will be the shape of the result when you perform the matrix multiplication X @ W?
- A(50, 100)
- B(100, 50)
- C(50, 10)
- D(100, 10)
2.A neural network layer receives input vectors of shape (64, 256) and uses a weight matrix of shape (256, 128). What is the shape of the output vectors?
- A(128, 256)
- B(256, 128)
- C(64, 128)
- D(64, 256)
3.You attempt to multiply matrices A (20, 50) and B (30, 20). What error will occur?
- ANo error, multiplication is successful
- BMemory overflow error
- CShape mismatch error
- DType error
4.A matrix multiplication operation is performed on matrices of shape (128, 512) and (512, 256). Why is a GPU beneficial for this operation?
- AGPUs can perform parallel matrix multiplications efficiently
- BGPUs prevent shape mismatch errors
- CGPUs have more memory than CPUs
- DGPUs are faster at sequential operations
5.You mistakenly try to multiply a matrix of shape (10, 20) with another of shape (20, 5) and then add a bias vector of shape (10,). What will happen?
- AType error
- BShape mismatch error
- CBroadcasting error
- DSuccessful operation
6.Given matrices X (16, 64) and W (64, 32), what would be the result of X @ W?
- AA matrix of shape (16, 32)
- BA matrix of shape (64, 32)
- CA matrix of shape (32, 16)
- DA matrix of shape (16, 64)
7.You have a matrix X of shape (10, 784) and a weight matrix W of shape (784, 128). What is the shape of the output after applying a linear layer?
- A(10, 128)
- B(10, 784)
- C(784, 128)
- D(128, 10)
8.When multiplying two matrices, why must the inner dimensions match?
- ATo make the multiplication faster
- BTo avoid memory errors
- CTo prevent type errors
- DTo ensure each element of a row can pair with an element of a column