Skip to content

Commit a179c37

Browse files
fix: load model on cpu to avoid pb after training
1 parent d44d051 commit a179c37

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

torchTextClassifiers/torchTextClassifiers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ def predict(
486486
text = X_test["text"]
487487
categorical_variables = X_test["categorical_variables"]
488488

489-
self.pytorch_model.eval()
489+
self.pytorch_model.eval().cpu()
490490

491491
tokenize_output = self.tokenizer.tokenize(
492492
text.tolist(), return_offsets_mapping=return_offsets_mapping

0 commit comments

Comments
 (0)