Clean up backtracking gradient descent code
Drop experimental singularity handling strategies. Reduce the default tolerance to within 64-bit floating point precision. Report success.
This commit is contained in:
parent
25b09ebf92
commit
7b3efbc385
4 changed files with 41 additions and 82 deletions
|
@ -37,9 +37,14 @@ guess = sqrt(1/BigFloat(3)) * BigFloat[
|
|||
#=
|
||||
L, history = Engine.realize_gram_newton(gram, guess)
|
||||
=#
|
||||
L, history = Engine.realize_gram(gram, guess, max_descent_steps = 50)
|
||||
L, success, history = Engine.realize_gram(gram, guess)
|
||||
completed_gram = L'*Engine.Q*L
|
||||
println("Completed Gram matrix:\n")
|
||||
display(completed_gram)
|
||||
println("\nSteps: ", size(history.scaled_loss, 1))
|
||||
if success
|
||||
println("\nTarget accuracy achieved!")
|
||||
else
|
||||
println("\nFailed to reach target accuracy")
|
||||
end
|
||||
println("Steps: ", size(history.scaled_loss, 1))
|
||||
println("Loss: ", history.scaled_loss[end], "\n")
|
Loading…
Add table
Add a link
Reference in a new issue