Skip to content

Commit c63ee4f

Browse files
author
Guanheng Zhang
committed
checkpoint
1 parent b4c030b commit c63ee4f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

beginner_source/torchtext_translation_tutorial.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
#
3636
# ::
3737
#
38-
# python -m spacy download en
39-
# python -m spacy download de
38+
# python -m spacy download en
39+
# python -m spacy download de
4040

4141
import torchtext
4242
import torch
@@ -395,7 +395,7 @@ def count_parameters(model: nn.Module):
395395

396396

397397
def train(model: nn.Module,
398-
iterator,
398+
iterator: torch.utils.data.DataLoader,
399399
optimizer: optim.Optimizer,
400400
criterion: nn.Module,
401401
clip: float):
@@ -428,7 +428,7 @@ def train(model: nn.Module,
428428

429429

430430
def evaluate(model: nn.Module,
431-
iterator,
431+
iterator: torch.utils.data.DataLoader,
432432
criterion: nn.Module):
433433

434434
model.eval()

0 commit comments

Comments
 (0)