facebookresearch / SentEval

A python tool for evaluating the quality of sentence embeddings.
Other
2.09k stars 309 forks source link

Current bow.py will fail without cuda #77

Open trdavidson opened 4 years ago

trdavidson commented 4 years ago

Hi guys, just wanted to highlight that currently the bow.py example will fail when not GPUs are available due to the hard-coded .cuda conversions in senteval/tools/classifier.py. An easy fix is to init the classifier with a device variable, and simply set .to(self.device) everywhere. Thanks for making this framework available!