Solutions
DL-C01-C-001
A vector with 9 entries has one axis of length 9, so the shape is (9).
DL-C01-C-002
Rows come first and columns come second. A matrix with 7 rows and 4 columns has shape (7, 4).
DL-C01-C-003
The shape (32, 12) means 32 examples and 12 features per example. The batch size is 32.
DL-C01-C-004
The second dimension is the feature dimension, so each example has 12 features.
DL-C01-C-005
The product has shape:
(6, 5) x (5, 2) -> (6, 2)
The shared dimension 5 is used inside the product. The remaining dimensions are 6 and 2.
DL-C01-C-006
The product would require:
(6, 5) x (4, 2)
The inner dimensions are 5 and 4. They do not match, so the product is not valid.
DL-C01-C-007
The axis names are (batch, positions, features), and the shape is (3, 7, 16).
The feature axis is last, so each position has 16 features.
DL-C01-C-008
The first shape contains:
2 x 6 = 12
The second shape contains:
3 x 4 = 12
The entry count is preserved, so the reshape is valid.
DL-C01-C-009
The batch has shape (9, 5), and the bias has one value per feature.
The bias is reused for each of the 9 rows, so the output keeps shape (9, 5).
DL-C01-C-010
The layer accepts 12 input features and produces 6 output features.
In (input_features, output_features) order, the weight matrix has shape (12, 6).