Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated PyTorch Docs #1000

Merged
merged 4 commits into from
Jun 8, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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