Skip to content

Commit

Permalink
Updated PyTorch Docs (deepjavalibrary#1000)
Browse files Browse the repository at this point in the history
* Added auto softmax metadata for action_recognition

* Update PyTorch Docs
  • Loading branch information
AzizZayed authored Jun 8, 2021
1 parent e6890f9 commit a26f5b2
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 a26f5b2

Please sign in to comment.