Coder Social home page Coder Social logo

alfo5123 / variational-sparse-coding Goto Github PK

View Code? Open in Web Editor NEW
56.0 6.0 5.0 158.35 MB

Reproducing the paper "Variational Sparse Coding" for the ICLR 2019 Reproducibility Challenge

License: MIT License

Python 0.08% Jupyter Notebook 99.84% Makefile 0.01% TeX 0.08%
variational-autoencoder sparse-coding pytorch reproducible-research iclr unsupervised-learning disentangled-representations

variational-sparse-coding's People

Contributors

alfo5123 avatar robert-aduviri avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

variational-sparse-coding's Issues

About Reparameterization Trick of spike variable "gamma"

You said in VSC paper that
log(gamma) = - ReLu (-v_out) ・・・(1) ,
but if the activation function in hidden layer is "sigmoid" or "ReLu",
I think that (1) out the 0s in all dimensions.
So the model can't carry any information.
(But your experiments show good results!)

Would you teach me why this reparameterization trick works?
(I think log(gamma) = - ReLu (+v_out) will work well than (1))

In addition, how did you decide the range c-annealing from 50 to 200?

training scripts mismatch with models

Hi guys,
I'm trying to train vsc with the command you given in readme:

python train-vsc.py --dataset mnist --epochs 20 --report-interval 4 --lr 0.001 --alpha 0.2 --hidden-size 2000,2000 --latent-size 800

But it looks some mismatch exists:

VSC Baseline Experiments

Using cuda device...
Loading mnist dataset...
Done!

Traceback (most recent call last):
  File "train-vsc.py", line 31, in <module>
    args.normalize)
TypeError: __init__() missing 1 required positional argument: 'flatten'

For vae I got mismatch again:

python train-vae.py --dataset mnist --epochs 500 --report-interval 50 --lr 0.01
VAE Baseline Experiments

Using cuda device...
Loading mnist dataset...
Done!

Traceback (most recent call last):
  File "train-vae.py", line 30, in <module>
    normalize=args.normalize)
  File "/home/xd/project/Variational-Sparse-Coding/src/models/vae.py", line 58, in __init__
    self.model = VAE(self.input_sz, self.hidden_sz, latent_sz).to(device)
  File "/home/xd/project/Variational-Sparse-Coding/src/models/vae.py", line 15, in __init__
    self.fc1 = nn.Linear(input_sz, hidden_szs[0])
  File "/home/xd/anaconda3/envs/vsc/lib/python3.7/site-packages/torch/nn/modules/linear.py", line 72, in __init__
    self.weight = Parameter(torch.Tensor(out_features, in_features))
TypeError: new(): argument 'size' must be tuple of ints, but found element of type tuple at pos 2

I'm using master branch and I know that I could fix these problems by myself since this is an open source project. Just let you guys be awared of that... And could you kindly push the updated model if it's possible.

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.