GithubHelp home page GithubHelp logo

f-dangel / deepobs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from abahde/deepobs

1.0 1.0 0.0 535.35 MB

DeepOBS: A Deep Learning Optimizer Benchmark Suite

License: MIT License

Python 98.58% Shell 1.42%

deepobs's People

Contributors

abahde avatar f-dangel avatar fsschneider avatar

Stargazers

 avatar

deepobs's Issues

quadratic compatibility for BackPACK

Make the quadratic testproblem compatible with BackPACK by using Linear and MSELoss.

Important This will change the loss for a single sample to 1 / dim (xโˆ’๐œƒ)แต€ H (x โˆ’ ๐œƒ) where dim denotes the dimensionality of the input (default: 100). This could affect the baselines.

Currently, the problem is given by 0.5 (xโˆ’๐œƒ)แต€ H (x โˆ’ ๐œƒ), minimizing over ๐œƒ. The Hessian is PSD and can be decomposed as H = RRแต€. One can rewrite this problem as regression:

  • Sample data points x from the quadratic problems and use 0 as label
  • Use the neural network
    • nn.Linear: x โ†’ z = โˆ’I x + ๐œƒ
    • nn.Linear: z โ†’ f = Rแต€ z + 0
    • Only trainable parameter: ๐œƒ
  • Loss function (dim denotes the dimensionality of f):
    • nn.MSELoss: f โ†’ โ„“ = (f โˆ’ 0)แต€ (f โˆ’ 0) = (xโˆ’๐œƒ)แต€ H (x โˆ’ ๐œƒ) / dim

Notes:

  • Both linear layers can be combined into a single one, but then the gradient w.r.t its bias would not correspond to the gradient w.r.t ๐œƒ.
  • MSELoss in torch does not use the factor 0.5. It would be discarded.
  • MSELoss in torch averages over the inputs. Hence,there is an additional scale of 1 / dim

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.