ebanalyse / NERDA

Framework for fine-tuning pretrained transformers for Named-Entity Recognition (NER) tasks
MIT License
153 stars 35 forks source link

troubles with 'device' parameter in models.py #8

Closed Combo-Breaker closed 3 years ago

Combo-Breaker commented 3 years ago

Hi there!

I have some troubles when I specify the device in NERDA model:

image

At the same time, when I do not specify the device parameter, everything works just fine. Looks like the trouble is in models.py here : if device != None, self.device is not initialized.

Combo-Breaker commented 3 years ago

upd: I've created a PR, hope it is OK (:

and thank you for your work, the model is very cool and easy to use

smaakage85 commented 3 years ago

thank you so much, @Combo-Breaker . And thank you so much, for your pull request. I'll implement it asap.