Giter Site home page Giter Site logo

optml's Introduction

Mini-Project for the Class Optimizations for Machine Learning thaught at EPFL, Spring Semester 2022

Title: The Art of Hypertuning: A Comparative Analysis of Different Optimization Techniques

Members:

  • Ana Lucia Carrizo, Msc Data Science, EPFL
  • Amine Tourki, Msc Robotics, EPFL
  • Mortadha Abderrahim, Msc Data Science, EPFL

Description:

Fine tuning hyperparameters for Deep Neural Networks is one of the most challenging tasks in deep learning. Learning rate tuning has been a major focus and methods like schedulers and learning rate optimizers have been a major success. Over recent years, researchers have shown interest over other parameters such as momentum with optimizers like ADAM, momentum SGD or Nesterov Accelerated Gradient (NAG). In this project we further explore momentum tuning techniques such as momentum decay with two State-Of-The-Art optimizers: Demon and YellowFin. We compare their performances with already established optimizers like Adam and SGD. We conclude on the performance of momentum tuning techniques and their viability.

Implementation Details

To run this project we took advantage of Google Colab's GPUs. To implement the project, one needs to add all files to a Google Drive common folder, and mount said folder in the main notebook.

Built with:

  • PyTorch
  • Torchvision
  • Sklearn
  • Numpy
  • Time
  • Itertools
  • matplotlib.pyplot

Project's Structure

  • main.ipynb: notebook that runs each model with their respectives hyperparameters and plots the accuracies evolution per epoch.
  • hypertuning.ipynb: notebook that finds the best parameters per model.
  • SGDhypertuning.ipynb: notebook that finds the best parameters per model for SGD based models (SGD, SGDM, SGD-Nesterov).
  • model.py: script containing the definition of the neural network, and the function to reset its weights.
  • helpers.py: script containing all the helper functions we will need to find the hyperparameters and run the K-Fold Cross-Validation.
  • averaging.py: contains the resultS from doing 3 runs.
  • YellowFin: folder containing the files to use the YellowFin optimizer.
    • yellowfin.py: script were we define the YFOptimizer.
    • helpers_yellowfin.py: contains the helper functions to run the K-Fold Cross-Validation and find the hyperparameters for this model.
    • yellowfin_mnist.ipynb: example of simple implementation of YellowFin.
  • DemonRangerOptimizer: folder containing the files to use the ADAM Demon optimizer.
    • optimizers.py: script were we define the DemonRanger optimizer.
    • helpers_demon.py: contains the helper functions to run the K-Fold Cross-Validation and find the hyperparameters for this model.
    • DemonAdam.ipynb: example of simple implementation of ADAM Demon.

optml's People

Contributors

analucarrizo avatar mortadha-abderrhim avatar

Stargazers

Amine Tourki avatar

Watchers

 avatar

Forkers

aminetourki

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.