Skip to content

Commit e8ebbe5

Browse files
committed
fix typo
1 parent 42be0e1 commit e8ebbe5

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

โ€Ž.build/requirements-minimal.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ sphinx-sitemap
1212
sphinxext-opengraph
1313
sphinxcontrib-katex
1414
plotly==5.14.0
15-
torch==2.3
15+
torch
1616
torchvision
1717
torchtext
1818
torchaudio

โ€Žbeginner_source/chatbot_tutorial.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ def outputVar(l, voc):
523523
max_target_len = max([len(indexes) for indexes in indexes_batch])
524524
padList = zeroPadding(indexes_batch)
525525
mask = binaryMatrix(padList)
526-
mask = torch.ByteTensor(mask)
526+
mask = torch.BoolTensor(mask)
527527
padVar = torch.LongTensor(padList)
528528
return padVar, mask, max_target_len
529529

โ€Žintermediate_source/seq2seq_translation_tutorial.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,7 @@ def evaluateRandomly(encoder, decoder, n=10):
750750
pair = random.choice(pairs)
751751
print('>', pair[0])
752752
print('=', pair[1])
753-
output_words, attentions = evaluate(encoder, decoder, pair[0])
753+
output_words, _ = evaluate(encoder, decoder, pair[0], input_lang, output_lang)
754754
output_sentence = ' '.join(output_words)
755755
print('<', output_sentence)
756756
print('')

0 commit comments

Comments
ย (0)