mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 09:26:27 +03:00
Add comment
This commit is contained in:
parent
28c26e212d
commit
ce1fe8a510
|
@ -94,6 +94,8 @@ def _preprocess_doc(docs, drop=0.0):
|
|||
|
||||
|
||||
def with_cpu(ops, model):
|
||||
"""Wrap a model that should run on CPU, transferring inputs and outputs
|
||||
as necessary."""
|
||||
model.to_cpu()
|
||||
def with_cpu_forward(inputs, drop=0.):
|
||||
cpu_outputs, backprop = model.begin_update(_to_cpu(inputs), drop=drop)
|
||||
|
|
Loading…
Reference in New Issue
Block a user