perplexabot
Gold Member
- 328
- 5
Hey,
I have been trying to figure out how to solve \triangledown_x ||f(x)||^2_2.
I have used the chain rule (hopefully correctly) to get the following:
\triangledown_x ||f(x)||^2_2=2\triangledown_xf(x)^T \frac{f(x)^T}{||f(x)||_2}
Is this correct?
The reason I doubt my answer is because I know the gradient of a scalar valued function should be a vector. My answer seems to give a scalar. Can anyone please shed some light...
Note: x \in \Re^n and I am using the convection that the gradient, \triangledown_x, of a function is a row vector. Also assume f: \Re^n\rightarrow \Re^m .
I have been trying to figure out how to solve \triangledown_x ||f(x)||^2_2.
I have used the chain rule (hopefully correctly) to get the following:
\triangledown_x ||f(x)||^2_2=2\triangledown_xf(x)^T \frac{f(x)^T}{||f(x)||_2}
Is this correct?
The reason I doubt my answer is because I know the gradient of a scalar valued function should be a vector. My answer seems to give a scalar. Can anyone please shed some light...
Note: x \in \Re^n and I am using the convection that the gradient, \triangledown_x, of a function is a row vector. Also assume f: \Re^n\rightarrow \Re^m .
Last edited: