Giter Club home page Giter Club logo

ada_sls's Introduction

Ada-SLS

Adaptive Gradient Methods Converge Faster with Over-Parameterization (and you can do a line-search) [Paper]

Our AMSGrad Armijo SLS and AdaGrad Armijo SLS consistently achieve best generalization results.

Installation

pip install git+https://github.com/IssamLaradji/ada_sls.git

Usage

Use AdaSls in your code by adding the following script.

import adasls
opt = adasls.AdaSLS(model.parameters())

for epoch in range(100):
    opt.zero_grad()
    closure = lambda : torch.nn.MSELoss()(model(X), Y)
    opt.step(closure=closure)

Experiments

Install the requirements

pip install -r requirements.txt

Run the experiments for the paper using the command below:

python trainval.py -e ${GROUP}_{BENCHMARK} -sb ${SAVEDIR_BASE} -d ${DATADIR} -r 1

with the placeholders defined as follows.

{GROUP}:

Defines the set of optimizers to run, which can either be,

  • nomom for opimizers without momentum; or
  • mom for opimizers with momentum.

{BENCHMARK}:

Defines the dataset, evaluation metric and model for the experiments (see exp_configs.py), which can be,

  • syn for the synthetic experiments;
  • kernels for the kernel experiments;
  • mf for matrix factorization experiments;
  • mnist for the mnist experiments;
  • cifar10, cifar100, cifar10_nobn, cifar100_nobn for the cifar experiments; or
  • imagenet200, imagenet10 for the imagenet experiments.

{SAVEDIR_BASE}:

Defines the absolute path to where the results will be saved.

{DATADIR}:

Defines the absolute path containing the downloaded datasets.

Cite

@article{vaswani2020adaptive,
  title={Adaptive Gradient Methods Converge Faster with Over-Parameterization (and you can do a line-search)},
  author={Vaswani, Sharan and Kunstner, Frederik and Laradji, Issam and Meng, Si Yi and Schmidt, Mark and Lacoste-Julien, Simon},
  journal={arXiv preprint arXiv:2006.06835},
  year={2020}
}

ada_sls's People

Contributors

issamlaradji avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.