Skip to content

Commit

Permalink
[fix] Fix jupyter notebook links (#2704)
Browse files Browse the repository at this point in the history
  • Loading branch information
sindhuvahinis authored Jul 12, 2023
1 parent e55110e commit 8dea610
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
3 changes: 1 addition & 2 deletions jupyter/load_pytorch_model.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,7 @@
"\n",
"Now, you can load any TorchScript model and run inference using it.\n",
"\n",
"You might also want to check out [load_mxnet_model.ipynb](https:/deepjavalibrary/djl/blob/master/jupyter/load_mxnet_model.ipynb) which demonstrates loading a local model directly instead of through the Model Zoo API.\n",
"To optimize inference performance, you might check out [how_to_optimize_inference_performance](https:/deepjavalibrary/djl/blob/master/docs/pytorch/how_to_optimize_inference_performance.md)."
"You might also want to check out [load_mxnet_model.ipynb](https:/deepjavalibrary/djl/blob/master/jupyter/load_mxnet_model.ipynb) which demonstrates loading a local model directly instead of through the Model Zoo API."
]
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"To run inference with this model, we need to load the model from Paddle model zoo. To load a model in DJL, you need to specify a [`Crieteria`](https://javadoc.io/doc/ai.djl/api/0.22.1/ai/djl/repository/zoo/Criteria.html). `Crieteria` is used identify where to load the model and which `Translator` should apply to it. Then, all we need to do is to get a [`Predictor`](https://javadoc.io/doc/ai.djl/api/latest/ai/djl/inference/Predictor.html) from the model and use it to do inference:"
"To run inference with this model, we need to load the model from Paddle model zoo. To load a model in DJL, you need to specify a [`Criteria`](https://javadoc.io/doc/ai.djl/api/0.22.1/ai/djl/repository/zoo/Criteria.html). `Criteria` is used identify where to load the model and which `Translator` should apply to it. Then, all we need to do is to get a [`Predictor`](https://javadoc.io/doc/ai.djl/api/latest/ai/djl/inference/Predictor.html) from the model and use it to do inference:"
]
},
{
Expand Down
12 changes: 12 additions & 0 deletions jupyter/rank_classification_using_BERT_on_Amazon_Review.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,18 @@
" tokens.forEach(token -> buf.put(vocab.getIndex(token)));\n",
" buf.put(vocab.getIndex(\"[SEP]\"));\n",
" }\n",
"\n",
" /** {@inheritDoc} */\n",
" @Override\n",
" public int dataRequired() {\n",
" throw new IllegalStateException(\"BertFeaturizer only support featurize, not deFeaturize\");\n",
" }\n",
"\n",
" /** {@inheritDoc} */\n",
" @Override\n",
" public Object deFeaturize(float[] data) {\n",
" throw new IllegalStateException(\"BertFeaturizer only support featurize, not deFeaturize\");\n",
" }\n",
"}"
]
},
Expand Down

0 comments on commit 8dea610

Please sign in to comment.