You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is really just for my curiosity. If appropriate, can you include a comment about why not just _inner(x, v1, v2) = LinearAlgebra.dot(v1, v2)? I can't tell if it's about accuracy, or performance, or ....
I know that LinearAlgebra.generic_norm2 does some rescaling for better numerical accuracy, and maybe dot does not.
The text was updated successfully, but these errors were encountered:
I kind of forgot why I did this. It is probably not necessary.
However, I do use sqrt(inner(x, v, v)) to compute the norm of a vector at various places throughout the code. While it is somewhat inefficient to square a number and then take its square root, I assume this has a negligible effect compared to other steps in these optimization algorithms. So with the current implementation, it is guaranteed that the norm is indeed the one computed by norm, if at least the default inner is used. (Hereby assuming that taking the square root of the square of a floating point number is identical to the input, which seems to be true).
OptimKit.jl/src/OptimKit.jl
Line 7 in 6f08a89
This is really just for my curiosity. If appropriate, can you include a comment about why not just
_inner(x, v1, v2) = LinearAlgebra.dot(v1, v2)
? I can't tell if it's about accuracy, or performance, or ....I know that
LinearAlgebra.generic_norm2
does some rescaling for better numerical accuracy, and maybedot
does not.The text was updated successfully, but these errors were encountered: