All Projects → bioinf-jku → Ttur

bioinf-jku / Ttur

Licence: apache-2.0
Two time-scale update rule for training GANs

Projects that are alternatives of or similar to Ttur

Torch Residual Networks
This is a Torch implementation of ["Deep Residual Learning for Image Recognition",Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun](http://arxiv.org/abs/1512.03385) the winners of the 2015 ILSVRC and COCO challenges.
Stars: ✭ 553 (-2.47%)
Mutual labels:  jupyter-notebook
Influence Release
Stars: ✭ 559 (-1.41%)
Mutual labels:  jupyter-notebook
Pyradiomics
Open-source python package for the extraction of Radiomics features from 2D and 3D images and binary masks. Support: https://discourse.slicer.org/c/community/radiomics
Stars: ✭ 563 (-0.71%)
Mutual labels:  jupyter-notebook
Tf Dann
Domain-Adversarial Neural Network in Tensorflow
Stars: ✭ 556 (-1.94%)
Mutual labels:  jupyter-notebook
Data Science Portfolio
Portfolio of data science projects completed by me for academic, self learning, and hobby purposes.
Stars: ✭ 559 (-1.41%)
Mutual labels:  jupyter-notebook
Datasciencecourse
This holds iPython notebooks and lecture slides for the Intro to Data Science Master's course I teach at NYU.
Stars: ✭ 557 (-1.76%)
Mutual labels:  jupyter-notebook
Reinforce
Reinforcement Learning Algorithm Package & PuckWorld, GridWorld Gym environments
Stars: ✭ 552 (-2.65%)
Mutual labels:  jupyter-notebook
Detectorch
Detectorch - detectron for PyTorch
Stars: ✭ 566 (-0.18%)
Mutual labels:  jupyter-notebook
Data Analysis And Machine Learning Projects
Repository of teaching materials, code, and data for my data analysis and machine learning projects.
Stars: ✭ 5,166 (+811.11%)
Mutual labels:  jupyter-notebook
Practical seq2seq
A simple, minimal wrapper for tensorflow's seq2seq module, for experimenting with datasets rapidly
Stars: ✭ 563 (-0.71%)
Mutual labels:  jupyter-notebook
Log Progress
https://habr.com/ru/post/276725/
Stars: ✭ 556 (-1.94%)
Mutual labels:  jupyter-notebook
Qs ledger
Quantified Self Personal Data Aggregator and Data Analysis
Stars: ✭ 559 (-1.41%)
Mutual labels:  jupyter-notebook
Prml
Repository of notes, code and notebooks for the book Pattern Recognition and Machine Learning by Christopher Bishop
Stars: ✭ 560 (-1.23%)
Mutual labels:  jupyter-notebook
Numerical Tours
Numerical Tours of Signal Processing
Stars: ✭ 553 (-2.47%)
Mutual labels:  jupyter-notebook
Fastcore
Python supercharged for the fastai library
Stars: ✭ 565 (-0.35%)
Mutual labels:  jupyter-notebook
Ada Build
The Ada Developers Academy Jump Start program, which is intended for anyone who is interested in beginning their journey into coding.
Stars: ✭ 551 (-2.82%)
Mutual labels:  jupyter-notebook
Mellotron
Mellotron: a multispeaker voice synthesis model based on Tacotron 2 GST that can make a voice emote and sing without emotive or singing training data
Stars: ✭ 560 (-1.23%)
Mutual labels:  jupyter-notebook
Machine Learning Specialization
Stars: ✭ 566 (-0.18%)
Mutual labels:  jupyter-notebook
Hands On Machine Learning For Algorithmic Trading
Hands-On Machine Learning for Algorithmic Trading, published by Packt
Stars: ✭ 562 (-0.88%)
Mutual labels:  jupyter-notebook
Wenzheng
ai challenger 2018细粒度情感分类第一名解决方案, A training framework itegrating tensorflow and pytorch
Stars: ✭ 561 (-1.06%)
Mutual labels:  jupyter-notebook

Two time-scale update rule for training GANs

This repository contains code accompanying the paper GANs Trained by a Two Time-Scale Update Rule Converge to a Local Nash Equilibrium.

Fréchet Inception Distance (FID)

The FID is the performance measure used to evaluate the experiments in the paper. There, a detailed description can be found in the experiment section as well as in the the appendix in section A1.

In short: The Fréchet distance between two multivariate Gaussians X_1 ~ N(mu_1, C_1) and X_2 ~ N(mu_2, C_2) is

                   d^2 = ||mu_1 - mu_2||^2 + Tr(C_1 + C_2 - 2*sqrt(C_1*C_2)).

The FID is calculated by assuming that X_1 and X_2 are the activations of the coding layer pool_3 of the inception model (see below) for generated samples and real world samples respectivly. mu_n is the mean and C_n the covariance of the activations of the coding layer over all real world or generated samples.

IMPORTANT: The number of samples to calculate the Gaussian statistics (mean and covariance) should be greater than the dimension of the coding layer, here 2048 for the Inception pool 3 layer. Otherwise the covariance is not full rank resulting in complex numbers and nans by calculating the square root.

We recommend using a minimum sample size of 10,000 to calculate the FID otherwise the true FID of the generator is underestimated.

Compatibility notice

Previous versions of this repository contained two implementations to calculate the FID, a "unbatched" and a "batched" version. The "unbatched" version should not be used anymore. If you've downloaded this code previously, please update it immediately to the new version. The old version included a bug!

A pytorch implementation of the FID

If you're looking for a pytorch implementation we recommend https://github.com/mseitzer/pytorch-fid

Provided Code

Requirements: TF 1.1+, Python 3.x

fid.py

This file contains the implementation of all necessary functions to calculate the FID. It can be used either as a python module imported into your own code, or as a standalone script to calculate the FID between precalculated (training set) statistics and a directory full of images, or between two directories of images.

To compare directories with pre-calculated statistics (e.g. the ones from http://bioinf.jku.at/research/ttur/), use:

fid.py /path/to/images /path/to/precalculated_stats.npz

To compare two directories, use

fid.py /path/to/images /path/to/other_images

See fid.py --help for more details.

fid_example.py

Example code to show the usage of fid.py in your own Python scripts.

precalc_stats_example.py

Example code to show how to calculate and save training set statistics.

WGAN_GP

Improved WGAN (WGAN-GP) implementation forked from https://github.com/igul222/improved_wgan_training with added FID evaluation for the image model and switchable TTUR/orig settings. Lanuage model with JSD Tensorboard logging and switchable TTUR/orig settings.

Precalculated Statistics for FID calculation

Precalculated statistics for datasets

are provided at: http://bioinf.jku.at/research/ttur/

Additional Links

For FID evaluation download the Inception modelf from http://download.tensorflow.org/models/image/imagenet/inception-2015-12-05.tgz

The cropped CelebA dataset can be downloaded here http://mmlab.ie.cuhk.edu.hk/projects/CelebA.html

To download the LSUN bedroom dataset go to: http://www.yf.io/p/lsun

The 64x64 downsampled ImageNet training and validation datasets can be found here http://image-net.org/small/download.php

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].