Coder Social home page Coder Social logo

cmranieri / fullyspikingvae Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kamata1729/fullyspikingvae

1.0 0.0 0.0 282.8 MB

Fully Spiking Variational Autoencoder

Home Page: https://arxiv.org/abs/2110.00375

License: MIT License

Python 99.61% Dockerfile 0.22% Shell 0.17%

fullyspikingvae's Introduction

Fully Spiking Variational Autoencoder

official implementation of Fully Spiking Variational Autoencoder

Accepted to AAAI2022!!

arxiv: https://arxiv.org/abs/2110.00375

overview

Get started

  1. install dependencies
pip install -r requirements.txt
  1. initialize the fid stats
python init_fid_stats.py

Demo

The following command calculates the Inception score & FID of FSVAE trained on CelebA. After that, it outputs demo_input.png, demo_recons.png, and demo_sample.png.

python demo.py

Training Fully Spiking VAE

python main_fsvae.py exp_name -config NetworkConfigs/dataset_name.yaml

Training settings are defined in NetworkConfigs/*.yaml.

args:

  • name: [required] experiment name
  • config: [required] config file path
  • checkpoint: checkpoint path (if use pretrained model)
  • device: device id of gpu, default 0

You can watch the logs with below command and access http://localhost:8009/

tensorboard --logdir checkpoint --bind_all --port 8009

Training ANN VAE

As a comparison method, we prepared vanilla VAEs of the same network architecture built with ANN, and trained on the same settings.

python main_ann_vae.py exp_name -dataset dataset_name

args:

  • name: [required] experiment name
  • dataset:[required] dataset name [mnist, fashion, celeba, cifar10]
  • batch_size: default 250
  • latent_dim: default 128
  • checkpoint: checkpoint path (if use pretrained model)
  • device: device id of gpu, default 0

Evaluation

results

Reconstructed Images

mnist_recons fashion_recons cifar_recons celeb_recons

Generated Images

mnist fashion cifar celeb

fullyspikingvae's People

Contributors

cmranieri avatar kamata1729 avatar

Stargazers

 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.