Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature addition: Backtracking Line Search for optimization #1419

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
updated backtracking line search
NeelGhoshal authored Aug 31, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 07fafc047f1d057ae4f2c0d4a44606de4ac4ed50
13 changes: 2 additions & 11 deletions tensorflow_probability/python/optimizer/linesearch/backtracking.py
Original file line number Diff line number Diff line change
@@ -32,16 +32,7 @@ def backtracking ( function,
beta = 0.707,
alpha = 1):
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
alpha = 1):
alpha = 0.3):

Doesn't the Backtracking Line Search algorithm have a constraint that α be between 0 and 0.5?
Stanford EE64a Slides, see page 6


while function(value-(alpha*differentiation(value)))>function(value) -(alpha/2)*((differentiation(value))**2):
while function(value-(alpha*differentiation(value)))>function(value) -
(alpha/2)*((differentiation(value))**2):
alpha *= beta
return alpha

backtracking(function,differentiation,value)