Skip to content

Commit

Permalink
Fix GPU training for textcat. Closes #3473
Browse files Browse the repository at this point in the history
  • Loading branch information
honnibal committed Mar 26, 2019
1 parent 85dcd94 commit f77bf2b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spacy/_ml.py
Original file line number Diff line number Diff line change
Expand Up @@ -614,9 +614,9 @@ def build_bow_text_classifier(nr_class, ngram_size=1, exclusive_classes=False,
no_output_layer=False, **cfg):
with Model.define_operators({">>": chain}):
model = (
extract_ngrams(ngram_size, attr=ORTH)
>> with_cpu(Model.ops,
LinearModel(nr_class)
with_cpu(Model.ops,
extract_ngrams(ngram_size, attr=ORTH)
>> LinearModel(nr_class)
)
)
if not no_output_layer:
Expand Down

0 comments on commit f77bf2b

Please sign in to comment.