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

which version of Pytorch, why i take the project to run,there are many problem? such as this code"hidden = hidden[:,running_seqs]" wish you can give me some advise, thanks #1

Closed KJ-Lin closed 6 years ago

timbmg commented 6 years ago

The PyTorch version is 0.3.1.

For you problem with hidden = hidden[:,running_seqs], could you please provide the error message?

KJ-Lin commented 6 years ago

thanks, the error message: TypeError: indexing a tensor with an object of type torch.LongTensor. The only supported types are integers, slices, numpy scalars and torch.LongTensor or torch.ByteTensor as the only argument.

timbmg commented 6 years ago

Thank you. I just tried again and it is running on my system.

Did you change anything in the code? How did you train the model? Also, could you print hidden and running_seqs before the error happens?

KJ-Lin commented 6 years ago

Thanks very much. The problem, which is the wrong of the version, has been dealt.

timbmg commented 6 years ago

So the error with the hidden update was also resolved by this?