Skip to content

Commit

Permalink
Update PyTorch Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
AzizZayed committed Jun 8, 2021
1 parent 32aa848 commit b530a11
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions jupyter/load_pytorch_model.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"metadata": {},
"outputs": [],
"source": [
"import java.nio.file.*;\n",
"import java.awt.image.*;\n",
"import ai.djl.*;\n",
"import ai.djl.inference.*;\n",
Expand Down Expand Up @@ -151,14 +152,9 @@
"metadata": {},
"outputs": [],
"source": [
"// Search for models in the build/pytorch_models folder\n",
"System.setProperty(\"ai.djl.repository.zoo.location\", \"build/pytorch_models/resnet18\");\n",
"\n",
"Criteria<Image, Classifications> criteria = Criteria.builder()\n",
" .setTypes(Image.class, Classifications.class)\n",
" // only search the model in local directory\n",
" // \"ai.djl.localmodelzoo:{name of the model}\"\n",
" .optArtifactId(\"ai.djl.localmodelzoo:resnet18\")\n",
" .optModelPath(Paths.get(\"build/pytorch_models/resnet18\"))\n",
" .optTranslator(translator)\n",
" .optProgress(new ProgressBar()).build();\n",
"\n",
Expand Down Expand Up @@ -230,7 +226,7 @@
"mimetype": "text/x-java-source",
"name": "Java",
"pygments_lexer": "java",
"version": "12.0.2+10"
"version": "11.0.11+9-LTS"
},
"pycharm": {
"stem_cell": {
Expand Down

0 comments on commit b530a11

Please sign in to comment.