All Projects → nlesc-dirac → pytorch

nlesc-dirac / pytorch

Licence: Apache-2.0 License
Improved LBFGS optimizer in PyTorch.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to pytorch

LBFGS-Lite
LBFGS-Lite: A header-only L-BFGS unconstrained optimizer.
Stars: ✭ 98 (+512.5%)
Mutual labels:  optimization, nonlinear-optimization, lbfgs
dfogn
DFO-GN: Derivative-Free Optimization using Gauss-Newton
Stars: ✭ 20 (+25%)
Mutual labels:  optimization, nonlinear-optimization
Nonlinear-Optimization-Algorithms
MATLAB implementations of a variety of nonlinear programming algorithms.
Stars: ✭ 86 (+437.5%)
Mutual labels:  optimization, nonlinear-optimization
lbfgsb-gpu
An open source library for the GPU-implementation of L-BFGS-B algorithm
Stars: ✭ 70 (+337.5%)
Mutual labels:  nonlinear-optimization, lbfgs
yarrow
[yarrow] JVMCI based optimizing compiler for HotSpot VM
Stars: ✭ 21 (+31.25%)
Mutual labels:  optimization
toy code
No description or website provided.
Stars: ✭ 78 (+387.5%)
Mutual labels:  optimization
gibbous
Convex optimization for java and scala, built on Apache Commons Math
Stars: ✭ 17 (+6.25%)
Mutual labels:  optimization
FrankWolfe.jl
Julia implementation for various Frank-Wolfe and Conditional Gradient variants
Stars: ✭ 47 (+193.75%)
Mutual labels:  optimization
structured-volume-sampling
A clean room implementation of Structured Volume Sampling by Bowles and Zimmermann in Unity
Stars: ✭ 27 (+68.75%)
Mutual labels:  optimization
autogoal
A Python framework for program synthesis with a focus on Automated Machine Learning.
Stars: ✭ 153 (+856.25%)
Mutual labels:  optimization
dmipy
The open source toolbox for reproducible diffusion MRI-based microstructure estimation
Stars: ✭ 58 (+262.5%)
Mutual labels:  optimization
Ftrl-FFM
Field-aware factorization machine (FFM) with FTRL
Stars: ✭ 25 (+56.25%)
Mutual labels:  optimization
yoga-image-optimizer
A graphical tool to convert and optimize JPEG, PNG and WebP images (based on YOGA)
Stars: ✭ 85 (+431.25%)
Mutual labels:  optimization
libcaesium
The Caesium compression library written in Rust
Stars: ✭ 58 (+262.5%)
Mutual labels:  optimization
tungsten
Bring fusion to everyone
Stars: ✭ 13 (-18.75%)
Mutual labels:  optimization
TSSKit-Threshold-Signature-Scheme-Toolkit
The project is open-sourced and funded by Binance Lab.
Stars: ✭ 70 (+337.5%)
Mutual labels:  optimization
image-optimizer
Smart image optimization
Stars: ✭ 15 (-6.25%)
Mutual labels:  optimization
awesome-go-perf
A curated list of Awesome Go performance libraries and tools
Stars: ✭ 232 (+1350%)
Mutual labels:  optimization
bio ik
MoveIt kinematics_base plugin based on particle optimization & GA
Stars: ✭ 104 (+550%)
Mutual labels:  optimization
Max-value-Entropy-Search
Max-value Entropy Search for Efficient Bayesian Optimization
Stars: ✭ 43 (+168.75%)
Mutual labels:  optimization

LBFGS optimizer

An improved LBFGS optimizer for PyTorch is provided with the code. Further details are given in this paper. Also see this introduction.

Examples of use:

Files included are:

lbfgsnew.py: New LBFGS optimizer

lbfgs.py: Symlink to lbfgsnew.py

cifar10_resnet.py: CIFAR10 ResNet training example (see figures below)

ResNet18/101 training loss/time

The above figure shows the training loss and training time using Colab with one GPU. ResNet18 and ResNet101 models are used. Test accuracy after 20 epochs: 84% for LBFGS and 82% for Adam.

Changing the activation from commonly used ReLU to others like ELU gives faster convergence in LBFGS, as seen in the figure below.

ResNet Wide 50-2 training loss

Here is a comparison of both training error and test accuracy for ResNet9 using LBFGS and Adam.

ResNet 9 training loss and test accuracy

Example usage in full batch mode:

from lbfgsnew import LBFGSNew
optimizer = LBFGSNew(model.parameters(), history_size=7, max_iter=100, line_search_fn=True, batch_mode=False)

Example usage in minibatch mode:

from lbfgsnew import LBFGSNew
optimizer = LBFGSNew(model.parameters(), history_size=7, max_iter=2, line_search_fn=True, batch_mode=True)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].