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

Error due to invalid data types #2

Closed Deepayan137 closed 6 years ago

Deepayan137 commented 6 years ago

Hi Tim, I guess you forgot to add .cuda to model at line no. 40, This is causing TypeError while trying to execute the inference.py code.

use_gpu = torch.cuda.is_available()
    if use_gpu:
        model=model.cuda()
    model.eval()

I guess the above snippet will fix it. :)

timbmg commented 6 years ago

Great, thank you! I added it 👍