Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2b5de98

Browse files
authored
FIX: add neccessary backticks (#2309) (#2315)
1 parent 9efe789 commit 2b5de98

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

beginner_source/basics/saveloadrun_tutorial.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
# To load model weights, you need to create an instance of the same model first, and then load the parameters
3434
# using ``load_state_dict()`` method.
3535

36-
model = models.vgg16() # we do not specify weights, i.e. create untrained model
36+
model = models.vgg16() # we do not specify ``weights``, i.e. create untrained model
3737
model.load_state_dict(torch.load('model_weights.pth'))
3838
model.eval()
3939

beginner_source/transformer_tutorial.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def forward(self, x: Tensor) -> Tensor:
135135

136136
######################################################################
137137
# This tutorial uses ``torchtext`` to generate Wikitext-2 dataset.
138-
# To access torchtext datasets, please install torchdata following instructions at https://github.com/pytorch/data.
138+
# To access torchtext datasets, please install torchdata following instructions at https://github.com/pytorch/data.
139139
# %%
140140
# .. code-block:: bash
141141
#
@@ -175,7 +175,7 @@ def forward(self, x: Tensor) -> Tensor:
175175
train_iter = WikiText2(split='train')
176176
tokenizer = get_tokenizer('basic_english')
177177
vocab = build_vocab_from_iterator(map(tokenizer, train_iter), specials=['<unk>'])
178-
vocab.set_default_index(vocab['<unk>'])
178+
vocab.set_default_index(vocab['<unk>'])
179179

180180
def data_process(raw_text_iter: dataset.IterableDataset) -> Tensor:
181181
"""Converts raw text into a flat Tensor."""
@@ -196,7 +196,7 @@ def batchify(data: Tensor, bsz: int) -> Tensor:
196196
that wouldn't cleanly fit.
197197
198198
Arguments:
199-
data: Tensor, shape [N]
199+
data: Tensor, shape ``[N]``
200200
bsz: int, batch size
201201
202202
Returns:

0 commit comments

Comments
 (0)