From a26f5b2e4bd24cbda1ab2e6aba8435364cd139b9 Mon Sep 17 00:00:00 2001 From: Abd-El-Aziz Zayed <48853777+AzizZayed@users.noreply.github.com> Date: Tue, 8 Jun 2021 15:29:10 -0700 Subject: [PATCH] Updated PyTorch Docs (#1000) * Added auto softmax metadata for action_recognition * Update PyTorch Docs --- jupyter/load_pytorch_model.ipynb | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/jupyter/load_pytorch_model.ipynb b/jupyter/load_pytorch_model.ipynb index a21550611b8..6f16e2cd3cc 100644 --- a/jupyter/load_pytorch_model.ipynb +++ b/jupyter/load_pytorch_model.ipynb @@ -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", @@ -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 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", @@ -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": {