-
Notifications
You must be signed in to change notification settings - Fork 74.7k
Parallel quasi-newton optimizers for tensorflow-gpu #26100
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
Comments
Any updates? |
Found this from a tweet. Second-order methods are very efficient for small & smooth problems. An example is Picking an Optimizer for Style Transfer that shows BFGS performs better than SGD-like methods (related: tensorflow/tfjs#127). Currently this is done through a SciPy wrapper without GPU support (keras-team/keras#5085) Useful references:
|
You can have a look at the implementation of BFGS and LBFGS in Tensorflow_probability, which do not wrap Scipy: https://github.com/tensorflow/probability/tree/master/tensorflow_probability/python/optimizer |
It might be better to raise this feature request to Tensorflow_probability. |
I finally got TFP's BFGS optimizer working for a supervised problem. Would adding an example to https://github.com/tensorflow/tensorflow/tree/master/tensorflow/examples be desirable? |
@jvdillon WDYT? |
Can you share a code-snippet? |
@timudk, |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you. |
Closing as stale. Please reopen if you'd like to work on this further. |
Imported from GitHub PR openxla/xla#26100 These are no longer needed, since computations now know their callers. I kept the utility function to check if a computation is async, since it is used from many places. I had to remove one check from the AsyncStart constructor. Previously, it didn't actually verify that the computation isn't already called by an async-start, just that the special field is unset. I don't see a way to have this check and make the code in CommandBufferScheduling work. After this, the only remaining special case is kFusion. Copybara import of the project: -- 0f99b6f6a2e8fab85a90c7a451e94713034a90e5 by Johannes Reifferscheid <[email protected]>: Clean up special cases for AsyncStart in HloComputation. These are no longer needed, since computations now know their callers. I kept the utility function to check if a computation is async, since it is used from many places. I had to remove one check from the AsyncStart constructor. Previously, it didn't actually verify that the computation isn't already called by an async-start. I don't see a way to have this check and make the code in CommandBufferScheduling work. After this, the only remaining special case is kFusion. -- 2dbc6e9d74e2b235303830a1247dcbecf5fde0a3 by Johannes Reifferscheid <[email protected]>: Fix HloParser. Merging this change closes #26100 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#26100 from jreiffers:cg 2dbc6e9d74e2b235303830a1247dcbecf5fde0a3 PiperOrigin-RevId: 755257520
Imported from GitHub PR openxla/xla#26100 These are no longer needed, since computations now know their callers. I kept the utility function to check if a computation is async, since it is used from many places. I had to remove one check from the AsyncStart constructor. Previously, it didn't actually verify that the computation isn't already called by an async-start, just that the special field is unset. I don't see a way to have this check and make the code in CommandBufferScheduling work. After this, the only remaining special case is kFusion. Copybara import of the project: -- 0f99b6f6a2e8fab85a90c7a451e94713034a90e5 by Johannes Reifferscheid <[email protected]>: Clean up special cases for AsyncStart in HloComputation. These are no longer needed, since computations now know their callers. I kept the utility function to check if a computation is async, since it is used from many places. I had to remove one check from the AsyncStart constructor. Previously, it didn't actually verify that the computation isn't already called by an async-start. I don't see a way to have this check and make the code in CommandBufferScheduling work. After this, the only remaining special case is kFusion. Merging this change closes #26100 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#26100 from jreiffers:cg 0f99b6f6a2e8fab85a90c7a451e94713034a90e5 PiperOrigin-RevId: 755258248
Imported from GitHub PR openxla/xla#26100 These are no longer needed, since computations now know their callers. I kept the utility function to check if a computation is async, since it is used from many places. I had to remove one check from the AsyncStart constructor. Previously, it didn't actually verify that the computation isn't already called by an async-start, just that the special field is unset. I don't see a way to have this check and make the code in CommandBufferScheduling work. After this, the only remaining special case is kFusion. Copybara import of the project: -- 0f99b6f6a2e8fab85a90c7a451e94713034a90e5 by Johannes Reifferscheid <[email protected]>: Clean up special cases for AsyncStart in HloComputation. These are no longer needed, since computations now know their callers. I kept the utility function to check if a computation is async, since it is used from many places. I had to remove one check from the AsyncStart constructor. Previously, it didn't actually verify that the computation isn't already called by an async-start. I don't see a way to have this check and make the code in CommandBufferScheduling work. After this, the only remaining special case is kFusion. Merging this change closes #26100 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#26100 from jreiffers:cg 0f99b6f6a2e8fab85a90c7a451e94713034a90e5 PiperOrigin-RevId: 755258248
Imported from GitHub PR openxla/xla#26100 These are no longer needed, since computations now know their callers. I kept the utility function to check if a computation is async, since it is used from many places. I had to remove one check from the AsyncStart constructor. Previously, it didn't actually verify that the computation isn't already called by an async-start, just that the special field is unset. I don't see a way to have this check and make the code in CommandBufferScheduling work. After this, the only remaining special case is kFusion. Copybara import of the project: -- 0f99b6f6a2e8fab85a90c7a451e94713034a90e5 by Johannes Reifferscheid <[email protected]>: Clean up special cases for AsyncStart in HloComputation. These are no longer needed, since computations now know their callers. I kept the utility function to check if a computation is async, since it is used from many places. I had to remove one check from the AsyncStart constructor. Previously, it didn't actually verify that the computation isn't already called by an async-start. I don't see a way to have this check and make the code in CommandBufferScheduling work. After this, the only remaining special case is kFusion. -- 2dbc6e9d74e2b235303830a1247dcbecf5fde0a3 by Johannes Reifferscheid <[email protected]>: Fix HloParser. Merging this change closes #26100 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#26100 from jreiffers:cg 2dbc6e9d74e2b235303830a1247dcbecf5fde0a3 PiperOrigin-RevId: 755257520
Imported from GitHub PR openxla/xla#26100 These are no longer needed, since computations now know their callers. I kept the utility function to check if a computation is async, since it is used from many places. I had to remove one check from the AsyncStart constructor. Previously, it didn't actually verify that the computation isn't already called by an async-start, just that the special field is unset. I don't see a way to have this check and make the code in CommandBufferScheduling work. After this, the only remaining special case is kFusion. Copybara import of the project: -- 0f99b6f6a2e8fab85a90c7a451e94713034a90e5 by Johannes Reifferscheid <[email protected]>: Clean up special cases for AsyncStart in HloComputation. These are no longer needed, since computations now know their callers. I kept the utility function to check if a computation is async, since it is used from many places. I had to remove one check from the AsyncStart constructor. Previously, it didn't actually verify that the computation isn't already called by an async-start. I don't see a way to have this check and make the code in CommandBufferScheduling work. After this, the only remaining special case is kFusion. -- 2dbc6e9d74e2b235303830a1247dcbecf5fde0a3 by Johannes Reifferscheid <[email protected]>: Fix HloParser. Merging this change closes #26100 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#26100 from jreiffers:cg 2dbc6e9d74e2b235303830a1247dcbecf5fde0a3 PiperOrigin-RevId: 755257520
Imported from GitHub PR openxla/xla#26100 These are no longer needed, since computations now know their callers. I kept the utility function to check if a computation is async, since it is used from many places. I had to remove one check from the AsyncStart constructor. Previously, it didn't actually verify that the computation isn't already called by an async-start, just that the special field is unset. I don't see a way to have this check and make the code in CommandBufferScheduling work. After this, the only remaining special case is kFusion. Copybara import of the project: -- 0f99b6f6a2e8fab85a90c7a451e94713034a90e5 by Johannes Reifferscheid <[email protected]>: Clean up special cases for AsyncStart in HloComputation. These are no longer needed, since computations now know their callers. I kept the utility function to check if a computation is async, since it is used from many places. I had to remove one check from the AsyncStart constructor. Previously, it didn't actually verify that the computation isn't already called by an async-start. I don't see a way to have this check and make the code in CommandBufferScheduling work. After this, the only remaining special case is kFusion. Merging this change closes #26100 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#26100 from jreiffers:cg 0f99b6f6a2e8fab85a90c7a451e94713034a90e5 PiperOrigin-RevId: 755258248
Imported from GitHub PR openxla/xla#26100 These are no longer needed, since computations now know their callers. I kept the utility function to check if a computation is async, since it is used from many places. I had to remove one check from the AsyncStart constructor. Previously, it didn't actually verify that the computation isn't already called by an async-start, just that the special field is unset. I don't see a way to have this check and make the code in CommandBufferScheduling work. After this, the only remaining special case is kFusion. Copybara import of the project: -- 0f99b6f6a2e8fab85a90c7a451e94713034a90e5 by Johannes Reifferscheid <[email protected]>: Clean up special cases for AsyncStart in HloComputation. These are no longer needed, since computations now know their callers. I kept the utility function to check if a computation is async, since it is used from many places. I had to remove one check from the AsyncStart constructor. Previously, it didn't actually verify that the computation isn't already called by an async-start. I don't see a way to have this check and make the code in CommandBufferScheduling work. After this, the only remaining special case is kFusion. Merging this change closes #26100 PiperOrigin-RevId: 755381030
Please make sure that this is a feature request. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:feature_template
System information
Describe the feature and the current behavior/state.
Is there any interest in implementing quasi-Newton methods for tensorflow-gpu? There has been some work on a parallel L-BFGS-B method (https://www.sciencedirect.com/science/article/pii/S0097849314000119) for GPus.
Will this change the current api? How?
New implementation.
Who will benefit with this feature?
I have had some recent success with using the BFGS optimizer for feedforward neural network. This approach, however, is limited to small networks and to tensorflow-cpu.
Any Other info.
The text was updated successfully, but these errors were encountered: