GithubHelp home page GithubHelp logo

dl-pr2's Introduction

Deep Learning - Project 2

Performance of pre-trained CNNs (Deep-Transfer-Learning) as discriminator for Generative Neural Networks

This project researches the feasibility and performance of applying deep transfer learning on generative neural networks. This is done by taking an existing GAN architecture, and subsequently separating the generator from the discriminator. Then the discriminator is either left untrained, pre-trained on the desired dataset or pre-trained on a similar dataset (therefore applying deep transfer learning).

The following choices were made:

Structure of this repository

DL-PR2
│   
├─── discriminator1_digits
├─── discriminator1_fashion          
├─── discriminator2_digits          
├─── discriminator2_fashion
│           
└─── r_analysis   

The discriminatorx_d folders contain the pre-trained discriminators in Tensorflow SavedModel format. The 1 or 2 denotes whether the first implementation or second implementation was used. The name after the underscore denotes the dataset on which the discriminator was trained. The training method used can be found in the pretrain_disc.py file. Refer to the TensorFlow documentation on how to load these models.

The r_analysis folder contains the R scripts used to visualise the results of the experiments.

The multiple .sh files are used to execute the code on the Peregrine cluster, refer to the 'Running on Peregrine' section for more information.

main.py is the main entry point for the code, the experiments are executed by the code contained in experiment.py.

(set_session.py is a supplementary file that is used to initialise certain GPUs so that they can run TensorFlow)

Example output

No DTL DTL on the training dataset DTL on the other dataset
Digits dig-nodtl dig-dtl-same dig-dtl-fash
Fashion fash-nodtl fash-dtl-same fash-dtl-fash

Running on Peregrine

Peregrine is a compute cluster offered by the University of Groningen for its students. More information can be found here.

You can run the script on Peregrine as follows:

sbatch --job-name=JOBNAME main.sh --you "can" --use "python" --args "here"

Make sure to supply a descriptive job name, otherwise it will be impossible to find your results. Also check the run time when a job finishes and adjust the sbatch time parameter accordingly to avoid allocating too much time. For convenience, the output location is provided in the bash file by default.

The bash file currently assumes the project files are located at /home/$USER/deep_learning_course/project_2/, and will write its output to /home/$USER/deep_learning_course/project_2/output/ (as long as the python code respects the --outdir argument).

dl-pr2's People

Contributors

ramonmeffert avatar jesper-sk avatar leander-van-boven avatar cormodoran avatar

Stargazers

 avatar

Watchers

 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.