Coder Social home page Coder Social logo

ee559-project1's Introduction

EE559 - Deep Learning (EPFL), Spring 2020, Project 1: "Classification, weight sharing, auxiliary losses"

The objective of this project is to test different architectures to compare two digits visible in a two-channel image. It aims at showing in particular the impact of weight sharing, and of the use of an auxiliary loss to help the training of the main objective.

To run the project: Python test.py

Training time on the EPFL Deep Learning VM: 10-15 seconds per training with a CNN-based network, 2-3 s with a MLP-based network. (which gives trial times of about 2 min for CNN networks, and 30 s for MLP networks (for 10 trials)).

In test.py, different modes can be executed: 'train' for a single training, 'trial' for a N-round trial. Within the 'train' mode, visualizing training loss/accuracy graphs can be done by setting the 'plotting' flag to True.

In this project, four model architectures were implemented in the models/ folder

  • MLP, a baseline multi-layer perceptron
  • CNN, a baseline convolutional neural network
  • SiameseMLP, the Siamese version of MLP
  • SiameseCNN, the Siamese version of CNN

With Siamese networks, the alpha coefficient for auxiliary loss can be used. $alpha=0.5$ or $alpha=1$ generated results approaching 92% of test accuracy.

Description of other files/folders:

  • dlc_practical_prologue.py contains functions to create pairs from MNIST data
  • utils.py contains helpers for loading and processing data from dlc_practical_prologue.py, as well as initializing weights and creating plots.
  • train.py contains functions necessary for training, optimizing hyperparameters and performing N-round trials.
  • metrics.py contains metric functions (only accuracy here)
  • img/ contains images used in the report
  • data/ contains MNIST data from the MNIST handwritten digit database (http://yann.lecun.com/exdb/mnist/)

ee559-project1's People

Contributors

kamilseghrouchni avatar neclow avatar

Watchers

 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.