Giter Site home page Giter Site logo

chris-santiago / autoencoders Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 3.57 MB

Experimenting with various autoencoder architectures.

License: MIT License

Python 12.23% Jupyter Notebook 87.77%
autoencoder denoising-autoencoders hydra pytorch pytorch-lightning self-supervised-learning siamese-network simsiam-pytorch taskfile

autoencoders's Introduction

Experimenting with AutoEncoders

This repo (roughly) experiments with various autoencoder architectures to tease out their ability to learn meaningful representations of data in an unsupervised setting.

  • Each model is trained (unsupervised) on the 60k MNIST training set.
  • Models are evaluated via transfer learning on the 10k MNIST test set.
  • Each model's respective encodings of varying subsets of the 10k MNIST test set are input to train a linear classifier:
    • Each linear classifier is trained on increasing split sizes ([10, 100, 1000, 2000, 4000, 8000]) and evaluated on remaining subset of the 10K MNIST test set.
    • See autoencoders/compare.py for details.
  • Classifier performance is measured by mulit-class accuracy and (ROC)AUC.

Notes

  • Most models follow the architectures from their respective papers (see autoencoders/models/).
  • Hyperparameter optimization is not performed on the encoder models nor the linear classifiers.
  • Model specification/configuration located in the outputs/ directory.

Results

Install

Create a virtual environment with Python >= 3.10 and install from git:

pip install git+https://github.com/chris-santiago/autoencoders.git
conda env create -f environment.yml
cd autoencoders
pip install -e .

Use

Prerequisites

Hydra

This project uses Hydra for managing configuration CLI arguments. See autoencoders/conf for full configuration details.

Task

This project uses Task as a task runner. Though the underlying Python commands can be executed without it, we recommend installing Task for ease of use. Details located in Taskfile.yml.

Current commands

> task -l
task: Available tasks for this project:
* check-config:          Check Hydra configuration
* compare:               Compare encoders using linear baselines
* eval-downstream:       Evaluate encoders using linear baselines
* plot-downstream:       Plot encoder performance on downstream tasks
* train:                 Train a model
* wandb:                 Login to Weights & Biases

Example: Train a SiDAE model

The -- forwards CLI arguments to Hydra.

task train -- model=sidae2 data=simsiam callbacks=siam

Weights and Biases

This project is set up to log experiment results with Weights and Biases. It expects an API key within a .env file in the root directory:

WANDB_KEY=<my-super-secret-key>

Users can configure different logger(s) within the conf/trainer/default.yaml file.

Documentation

Documentation hosted on Github Pages: https://chris-santiago.github.io/autoencoders/

autoencoders's People

Contributors

chris-santiago avatar

Stargazers

 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.