Skip to content

Commit b306ffc

Browse files
Matthew InkawhichJoelMarcey
authored andcommitted
Move saving and loading models tutorial to pytorch_basics
1 parent 8cacb5c commit b306ffc

File tree

7 files changed

+14
-17
lines changed

7 files changed

+14
-17
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
beginner
33
intermediate
44
advanced
5+
pytorch_basics
56

67
#data things
78
beginner_source/hymenoptera_data

conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@
5252

5353
sphinx_gallery_conf = {
5454
'examples_dirs': ['beginner_source', 'intermediate_source',
55-
'advanced_source'],
56-
'gallery_dirs': ['beginner', 'intermediate', 'advanced'],
55+
'advanced_source', 'pytorch_basics_source'],
56+
'gallery_dirs': ['beginner', 'intermediate', 'advanced', 'pytorch_basics'],
5757
'filename_pattern': 'tutorial.py',
5858
'backreferences_dir': False
5959
}

index.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ Beginner Tutorials
7373
beginner/hybrid_frontend_tutorial
7474
beginner/finetuning_torchvision_models_tutorial
7575
beginner/dcgan_faces_tutorial
76-
beginner/saving_loading_models
7776
beginner/audio_classifier_tutorial
7877

7978
Intermediate Tutorials
@@ -150,10 +149,11 @@ Advanced Tutorials
150149

151150
.. toctree::
152151
:caption: PyTorch Basics
152+
:maxdepth: 1
153153

154154
pytorch_basics/installing_pytorch
155-
<pytorch_basics/abc>
156-
<pytorch_basics/123>
155+
pytorch_basics/saving_loading_models
156+
157157

158158
.. toctree::
159159
:caption: PyTorch Applied

pytorch_basics/123.rst

Lines changed: 0 additions & 2 deletions
This file was deleted.

pytorch_basics/abc.rst

Lines changed: 0 additions & 2 deletions
This file was deleted.

pytorch_basics_source/README.txt

Whitespace-only changes.

beginner_source/saving_loading_models.py renamed to pytorch_basics_source/saving_loading_models.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,26 +22,26 @@
2222
unpickling facilities to deserialize pickled object files to memory.
2323
This function also facilitates the device to load the data into (see
2424
`Saving & Loading Model Across
25-
Devices <#Saving-&-Loading-Model-Across-Devices>`__).
25+
Devices <#saving-loading-model-across-devices>`__).
2626
2727
3) `torch.nn.Module.load_state_dict <https://pytorch.org/docs/stable/nn.html?highlight=load_state_dict#torch.nn.Module.load_state_dict>`__:
2828
Loads a model’s parameter dictionary using a deserialized
2929
*state_dict*. For more information on *state_dict*, see `What is a
30-
state_dict? <#What-is-a-state_dict?>`__.
30+
state_dict? <#what-is-a-state-dict>`__.
3131
3232
**Contents:**
3333
34-
- `What is a state_dict? <#What-is-a-state_dict?>`__
34+
- `What is a state_dict? <#what-is-a-state-dict>`__
3535
- `Saving & Loading Model for
36-
Inference <#Saving-&-Loading-Model-for-Inference>`__
36+
Inference <#saving-loading-model-for-inference>`__
3737
- `Saving & Loading a General
38-
Checkpoint <#Saving-&-Loading-a-General-Checkpoint-for-Inference-and/or-Resuming-Training>`__
38+
Checkpoint <#saving-loading-a-general-checkpoint-for-inference-and-or-resuming-training>`__
3939
- `Saving Multiple Models in One
40-
File <#Saving-Multiple-Models-in-One-File>`__
40+
File <#saving-multiple-models-in-one-file>`__
4141
- `Warmstarting Model Using Parameters from a Different
42-
Model <#Warmstarting-Model-Using-Parameters-from-a-Different-Model>`__
42+
Model <#warmstarting-model-using-parameters-from-a-different-model>`__
4343
- `Saving & Loading Model Across
44-
Devices <#Saving-&-Loading-Model-Across-Devices>`__
44+
Devices <#saving-loading-model-across-devices>`__
4545
4646
"""
4747

0 commit comments

Comments
 (0)