I am trying to makes sense of vector and matrix dimensions for ungraded Lab 1.

Under section 1: Calculating alignment scores

1st question:

“n is the hidden dimension size”. Does that imply vectors **s** and **h** are in R^n? If so, the matrix multiplication W**s** and U**h** are not defined, as W and H are nxm matrices. Perhaps **s** and **h** are in R^m so this matrix multiplication works?

2nd question:

Near the bottom of the diagram is listed “Dense(2m,n)”. Assuming **s** and **h** are in R^m, I believe this should be Dense(n,2m). The matrices W and H are stacked side-by-side: [W|H] to create a nx2m matrix. This is multiplied by the vector [**s**|**h**]^T in R^2m to produce [W|H][**s**|**h**]^T = W**s** + U**h**.

Please let me know if I am correct, or if I’m missing something.

Thank you.