Suppose $$ W \in \mathbb{R}^{m\times n}, \quad h \in \mathbb{R}^{n} $$ What is $\nabla_WWh$ ?
In other words, how to calculate the gradient of $ \ Wh \ $ with respect to $ \ W \ $ ?
Suppose $$ W \in \mathbb{R}^{m\times n}, \quad h \in \mathbb{R}^{n} $$ What is $\nabla_WWh$ ?
In other words, how to calculate the gradient of $ \ Wh \ $ with respect to $ \ W \ $ ?
One straightforward option is to utilize the $\textrm{vec}$ operator \begin{align} \textrm{vec}\left(AXB\right) = \left(B^T \otimes A\right) \textrm{vec}\left(X\right). \end{align}
So, \begin{align} \textrm{vec}\left(Wh\right) &= \textrm{vec}\left(IWh\right) \\ &= \left(h^T \otimes I\right) \textrm{vec}\left(W\right). \end{align}
Then, take the derivative with respect to $W$, i.e., \begin{align} \frac{\partial}{\partial \textrm{vec}\left(W\right)} \left\{\left(h^T \otimes I\right) \textrm{vec}\left(W\right) \right\} &= h^T \otimes I \ , \end{align} where $I$ is an Identity matrix of appropriate size.