Skip to content

Commit c9233a5

Browse files
committed
Import torch from thinc
1 parent 5cbc9f4 commit c9233a5

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

spacy/ml/models/coref.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
from typing import List, Tuple
2-
import torch
32

43
from thinc.api import Model, chain
54
from thinc.api import PyTorchWrapper, ArgsKwargs
65
from thinc.types import Floats2d, Ints2d, Ints1d
7-
from thinc.util import xp2torch, torch2xp
6+
from thinc.util import torch, xp2torch, torch2xp
87

98
from ...tokens import Doc
109
from ...util import registry

spacy/ml/models/span_predictor.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
from typing import List, Tuple
2-
import torch
32

43
from thinc.api import Model, chain, tuplify
54
from thinc.api import PyTorchWrapper, ArgsKwargs
65
from thinc.types import Floats2d, Ints1d
7-
from thinc.util import xp2torch, torch2xp
6+
from thinc.util import torch, xp2torch, torch2xp
87

98
from ...tokens import Doc
109
from ...util import registry

0 commit comments

Comments
 (0)