Skip to content

Commit caa13be

Browse files
authored
Merge branch 'main' into fix-docs-import-os
2 parents b8d2eaf + 0f312df commit caa13be

File tree

4 files changed

+25
-14
lines changed

4 files changed

+25
-14
lines changed

advanced_source/dynamic_quantization_tutorial.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,18 @@ def tokenize(self, path):
134134
# -----------------------------
135135
#
136136
# This is a tutorial on dynamic quantization, a quantization technique
137-
# that is applied after a model has been trained. Therefore, we'll simply load some
138-
# pretrained weights into this model architecture; these weights were obtained
139-
# by training for five epochs using the default settings in the word language model
140-
# example.
137+
# that is applied after a model has been trained. Therefore, we'll simply
138+
# load some pretrained weights into this model architecture; these
139+
# weights were obtained by training for five epochs using the default
140+
# settings in the word language model example.
141+
#
142+
# Before running this tutorial, download the required pre-trained model:
143+
#
144+
# .. code-block:: bash
145+
#
146+
# wget https://s3.amazonaws.com/pytorch-tutorial-assets/word_language_model_quantize.pth
147+
#
148+
# Place the downloaded file in the data directory or update the model_data_filepath accordingly.
141149

142150
ntokens = len(corpus.dictionary)
143151

beginner_source/examples_autograd/polynomial_custom_function.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,11 @@ def forward(ctx, input):
3333
"""
3434
In the forward pass we receive a Tensor containing the input and return
3535
a Tensor containing the output. ctx is a context object that can be used
36-
to stash information for backward computation. You can cache arbitrary
37-
objects for use in the backward pass using the ctx.save_for_backward method.
36+
to stash information for backward computation. You can cache tensors for
37+
use in the backward pass using the ``ctx.save_for_backward`` method. Other
38+
objects can be stored directly as attributes on the ctx object, such as
39+
``ctx.my_object = my_object``. Check out `Extending torch.autograd <https://docs.pytorch.org/docs/stable/notes/extending.html#extending-torch-autograd>`_
40+
for further details.
3841
"""
3942
ctx.save_for_backward(input)
4043
return 0.5 * (5 * input ** 3 - 3 * input)

index.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -806,21 +806,21 @@ Welcome to PyTorch Tutorials
806806
:header: Using the ExecuTorch SDK to Profile a Model
807807
:card_description: Explore how to use the ExecuTorch SDK to profile, debug, and visualize ExecuTorch models
808808
:image: _static/img/ExecuTorch-Logo-cropped.svg
809-
:link: https://pytorch.org/executorch/stable/tutorials/sdk-integration-tutorial.html
809+
:link: https://docs.pytorch.org/executorch/main/tutorials/devtools-integration-tutorial.html
810810
:tags: Edge
811811

812812
.. customcarditem::
813813
:header: Building an ExecuTorch iOS Demo App
814814
:card_description: Explore how to set up the ExecuTorch iOS Demo App, which uses the MobileNet v3 model to process live camera images leveraging three different backends: XNNPACK, Core ML, and Metal Performance Shaders (MPS).
815815
:image: _static/img/ExecuTorch-Logo-cropped.svg
816-
:link: https://pytorch.org/executorch/stable/demo-apps-ios.html
816+
:link: https://github.com/pytorch-labs/executorch-examples/tree/main/mv3/apple/ExecuTorchDemo
817817
:tags: Edge
818818

819819
.. customcarditem::
820820
:header: Building an ExecuTorch Android Demo App
821821
:card_description: Learn how to set up the ExecuTorch Android Demo App for image segmentation tasks using the DeepLab v3 model and XNNPACK FP32 backend.
822822
:image: _static/img/ExecuTorch-Logo-cropped.svg
823-
:link: https://pytorch.org/executorch/stable/demo-apps-android.html
823+
:link: https://github.com/pytorch-labs/executorch-examples/tree/main/dl3/android/DeepLabV3Demo#executorch-android-demo-app
824824
:tags: Edge
825825

826826
.. customcarditem::
@@ -1123,9 +1123,9 @@ Additional Resources
11231123

11241124
Exporting to ExecuTorch Tutorial <https://pytorch.org/executorch/stable/tutorials/export-to-executorch-tutorial.html>
11251125
Running an ExecuTorch Model in C++ Tutorial < https://pytorch.org/executorch/stable/running-a-model-cpp-tutorial.html>
1126-
Using the ExecuTorch SDK to Profile a Model <https://pytorch.org/executorch/stable/tutorials/sdk-integration-tutorial.html>
1127-
Building an ExecuTorch iOS Demo App <https://pytorch.org/executorch/stable/demo-apps-ios.html>
1128-
Building an ExecuTorch Android Demo App <https://pytorch.org/executorch/stable/demo-apps-android.html>
1126+
Using the ExecuTorch SDK to Profile a Model <https://docs.pytorch.org/executorch/main/tutorials/devtools-integration-tutorial.html>
1127+
Building an ExecuTorch iOS Demo App <https://github.com/pytorch-labs/executorch-examples/tree/main/mv3/apple/ExecuTorchDemo>
1128+
Building an ExecuTorch Android Demo App <https://github.com/pytorch-labs/executorch-examples/tree/main/dl3/android/DeepLabV3Demo#executorch-android-demo-app>
11291129
Lowering a Model as a Delegate <https://pytorch.org/executorch/stable/examples-end-to-end-to-lower-model-to-delegate.html>
11301130

11311131
.. toctree::

intermediate_source/tiatoolbox_tutorial.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ The PatchPredictor class runs a CNN-based classifier written in PyTorch.
348348
- Alternatively, you can pass ``pretrained_model`` as a string
349349
argument. This specifies the CNN model that performs the prediction,
350350
and it must be one of the models listed
351-
`here <https://tia-toolbox.readthedocs.io/en/latest/usage.html?highlight=pretrained%20models#tiatoolbox.models.architecture.get_pretrained_model>`__.
351+
`here <https://tia-toolbox.readthedocs.io/en/stable/_autosummary/tiatoolbox.models.architecture.get_pretrained_model.html#tiatoolbox.models.architecture.get_pretrained_model>`__.
352352
The command will look like this:
353353
``predictor = PatchPredictor(pretrained_model='resnet18-kather100k', pretrained_weights=weights_path, batch_size=32)``.
354354
- ``pretrained_weights``: When using a ``pretrained_model``, the
@@ -621,7 +621,7 @@ results. Here are the arguments and their descriptions:
621621
which is equivalent to level 0. In general, this is the level of
622622
greatest resolution. In this particular case, the image has only one
623623
level. More information can be found in the
624-
`documentation <https://tia-toolbox.readthedocs.io/en/latest/usage.html?highlight=WSIReader.read_rect#tiatoolbox.wsicore.wsireader.WSIReader.read_rect>`__.
624+
`documentation <https://tia-toolbox.readthedocs.io/en/stable/_autosummary/tiatoolbox.wsicore.wsireader.WSIReader.html#tiatoolbox.wsicore.wsireader.WSIReader.read_rect>`__.
625625
- ``masks``: A list of paths corresponding to the masks of WSIs in the
626626
``imgs`` list. These masks specify the regions in the original WSIs
627627
from which we want to extract patches. If the mask of a particular

0 commit comments

Comments
 (0)