Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ner_head.py #7

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Update ner_head.py #7

wants to merge 2 commits into from

Conversation

brlvr
Copy link

@brlvr brlvr commented Aug 8, 2024

Update the code, when using spacy.prefer_gpu() before spacy.load() to run the model on GPU we get cupy.ndarray and than the torch.from_numpy crash in inference.

the commit catch cupy.ndarray and convert it to numpy ndarray and than the program will run as written before.

Resolves #6
Fix #6

brlvr added 2 commits August 8, 2024 15:10
Update the code, when using spacy.prefer_gpu() before spacy.load() to run the model on GPU we get  cupy.ndarray and than the torch.from_numpy crash in inference.

the commit catch cupy.ndarray and convert it to numpy ndarray and than the program will run as written before
supports gpu load
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

run the model with gpu
1 participant