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

TF2 Migration, issue with L-BFGS-B #123

Open
splicergroup opened this issue May 17, 2022 · 1 comment
Open

TF2 Migration, issue with L-BFGS-B #123

splicergroup opened this issue May 17, 2022 · 1 comment

Comments

@splicergroup
Copy link

I was able to get this to work with Tensorflow 2 on Windows 10 by converting a couple things for compatibility. However I'm stumped on one problem regarding the optimizer portion of the code. The Adam optimizer works fine with optimizer = tf.compat.v1.train.AdamOptimizer(args.learning_rate)

The L-BFGS-B optimizer does not seem to work with Tensorflow 2 as it's been removed. This is the part that needs to be migrated to work with Tensorflow 2

optimizer = tf.contrib.opt.ScipyOptimizerInterface(
    loss, method='L-BFGS-B',
    options={'maxiter': args.max_iterations,
        'disp': print_iterations})

I looked into tfp.optimizer.lbfgs_minimize but I have no idea how to get it working in the existing code. Do you have any ideas? I am using Nvidia Ampere architecture cards (RTX 3090) that do not support Tensorflow 1.x due to CUDA compute version. Would really like to use L-BFGS instead of Adam for better results.

@sbetzin
Copy link

sbetzin commented Jun 28, 2022

I had the same problem and stopped there with the Migration. Has anyone an migrated script to TF2 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants