Skip to content

Commit b530a11

Browse files
committed
Update PyTorch Docs
1 parent 32aa848 commit b530a11

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

jupyter/load_pytorch_model.ipynb

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"metadata": {},
4343
"outputs": [],
4444
"source": [
45+
"import java.nio.file.*;\n",
4546
"import java.awt.image.*;\n",
4647
"import ai.djl.*;\n",
4748
"import ai.djl.inference.*;\n",
@@ -151,14 +152,9 @@
151152
"metadata": {},
152153
"outputs": [],
153154
"source": [
154-
"// Search for models in the build/pytorch_models folder\n",
155-
"System.setProperty(\"ai.djl.repository.zoo.location\", \"build/pytorch_models/resnet18\");\n",
156-
"\n",
157155
"Criteria<Image, Classifications> criteria = Criteria.builder()\n",
158156
" .setTypes(Image.class, Classifications.class)\n",
159-
" // only search the model in local directory\n",
160-
" // \"ai.djl.localmodelzoo:{name of the model}\"\n",
161-
" .optArtifactId(\"ai.djl.localmodelzoo:resnet18\")\n",
157+
" .optModelPath(Paths.get(\"build/pytorch_models/resnet18\"))\n",
162158
" .optTranslator(translator)\n",
163159
" .optProgress(new ProgressBar()).build();\n",
164160
"\n",
@@ -230,7 +226,7 @@
230226
"mimetype": "text/x-java-source",
231227
"name": "Java",
232228
"pygments_lexer": "java",
233-
"version": "12.0.2+10"
229+
"version": "11.0.11+9-LTS"
234230
},
235231
"pycharm": {
236232
"stem_cell": {

0 commit comments

Comments
 (0)