oliverguhr / german-sentiment-lib

An easy to use python package for deep learning-based german sentiment classification.
https://pypi.org/project/germansentiment/
MIT License
58 stars 7 forks source link

makes the model use cuda device if available (insane speedup!) #7

Closed MarzellT closed 3 years ago

MarzellT commented 3 years ago

I just made a few adjustments because I wanted to make the model use my gpu. I didn't mess with anything besides a few details. The changes result in a massive speedup. Although I didn't properly benchmark my changes but compared to my i5-9500 where the processing of a few thousand texts would have taken hours my RTX 3070 made this a matter of two minutes.

MarzellT commented 3 years ago

You maybe also want to update the version number if you merge this.

oliverguhr commented 3 years ago

Hi @MarzellT, thanks for this PR. I am currently not in the office. I will merge you PR release a new package next week.

oliverguhr commented 3 years ago

@MarzellT thanks again for the PR. Your patch is now online with version 1.0.5 https://pypi.org/project/germansentiment/