From b496501590ee0753eeb3686037fffeb12f4c80d2 Mon Sep 17 00:00:00 2001 From: "Ossama W. Obeid" Date: Fri, 14 Apr 2023 10:20:56 +0400 Subject: [PATCH] Fixed issue where use_gpu=False still uses GPU. --- camel_tools/disambig/bert/unfactored.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/camel_tools/disambig/bert/unfactored.py b/camel_tools/disambig/bert/unfactored.py index 22ccf45..9ca03e7 100644 --- a/camel_tools/disambig/bert/unfactored.py +++ b/camel_tools/disambig/bert/unfactored.py @@ -254,7 +254,7 @@ def __init__(self, model_path, analyzer, scorer='uniform', tie_breaker='tag', use_gpu=True, batch_size=32, ranking_cache=None, ranking_cache_size=100000): self._model = { - 'unfactored': _BERTFeatureTagger(model_path) + 'unfactored': _BERTFeatureTagger(model_path, use_gpu=use_gpu) } self._analyzer = analyzer self._features = features