timbmg / Sentence-VAE

PyTorch Re-Implementation of "Generating Sentences from a Continuous Space" by Bowman et al 2015 https://arxiv.org/abs/1511.06349
580 stars 152 forks source link

Saving model args and fixed tensor squeezing #26

Closed kaletap closed 3 years ago

kaletap commented 3 years ago

I am currently playing around with VAE model using this repo. I've implemented two small changes that were helpful to me for using model that I trained:

  1. Model args saving in order to easily load it later on.
  2. Changed sample = sample.squeeze to sample = sample.reshape(-1) in model.py, since squeezing caused degeneration of tensor to zero dimensions when batch size was 1 during inference.