facebookresearch / InferSent

InferSent sentence embeddings
Other
2.28k stars 470 forks source link

UserWarning: volatile was removed and now has no effect #87

Closed ghost closed 6 years ago

ghost commented 6 years ago

When running InferSent with the latest pytorch version from master, I'm getting this warning:

InferSent/models.py:222: UserWarning: volatile was removed and now has no effect. Use `with torch.no_grad():` instead.
  sentences[stidx:stidx + bsize]), volatile=True)

When I changed the code of the encode method that caused the warning to use the with toch.grad() method, everything seemed to work as expected.