Skip to content

Commit 9f068a4

Browse files
committed
Update example notebook
1 parent e85cd38 commit 9f068a4

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

examples/00_intro_to_thinc.ipynb

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@
4444
},
4545
"outputs": [],
4646
"source": [
47-
"import thinc.util\n",
47+
"import thinc.compat\n",
4848
"# If you want to run this notebook on GPU, you'll need to install cupy.\n",
49-
"if not thinc.util.has_cupy:\n",
49+
"if not thinc.compat.has_cupy:\n",
5050
" !pip install \"cupy-cuda101\""
5151
]
5252
},
@@ -59,11 +59,11 @@
5959
},
6060
"outputs": [],
6161
"source": [
62-
"import thinc.util\n",
62+
"import thinc.compat\n",
6363
"# If you want to try out the tensorflow integration, you'll need to install that.\n",
6464
"# You'll either need to do tensorflow or tensorflow-gpu, depending on your\n",
6565
"# requirements.\n",
66-
"if not thinc.util.has_tensorflow:\n",
66+
"if not thinc.compat.has_tensorflow:\n",
6767
" !pip install \"tensorflow-gpu>=2\""
6868
]
6969
},
@@ -75,9 +75,9 @@
7575
},
7676
"outputs": [],
7777
"source": [
78-
"import thinc.util\n",
78+
"import thinc.compat\n",
7979
"# If you want to try out the PyTorch integration, you'll need to install it.\n",
80-
"if not thinc.util.has_torch:\n",
80+
"if not thinc.compat.has_torch:\n",
8181
" !pip install \"torch\""
8282
]
8383
},
@@ -89,9 +89,9 @@
8989
},
9090
"outputs": [],
9191
"source": [
92-
"import thinc.util\n",
92+
"import thinc.compat\n",
9393
"# If you want to try out the MxNet integration, you'll need to install it.\n",
94-
"if not thinc.util.has_mxnet:\n",
94+
"if not thinc.compat.has_mxnet:\n",
9595
" !pip install \"mxnet>=1.5.1,<1.6.0\""
9696
]
9797
},
@@ -117,10 +117,10 @@
117117
"outputs": [],
118118
"source": [
119119
"from thinc.api import prefer_gpu\n",
120-
"import thinc.util\n",
120+
"import thinc.compat\n",
121121
"print(\"Thinc GPU?\", prefer_gpu())\n",
122122
"\n",
123-
"if thinc.util.has_tensorflow:\n",
123+
"if thinc.compat.has_tensorflow:\n",
124124
" import tensorflow as tf\n",
125125
" print(\"Tensorflow GPU?\", bool(tf.config.experimental.list_physical_devices('GPU')))"
126126
]
@@ -1374,9 +1374,9 @@
13741374
"source": [
13751375
"from mxnet.gluon.nn import Dense, Sequential, Dropout\n",
13761376
"from thinc.api import MXNetWrapper, chain, Softmax\n",
1377-
"import thinc.util\n",
1377+
"import thinc.compat\n",
13781378
"\n",
1379-
"assert thinc.util.has_mxnet\n",
1379+
"assert thinc.compat.has_mxnet\n",
13801380
"\n",
13811381
"width = 32\n",
13821382
"nO = 10\n",

0 commit comments

Comments
 (0)