Skip to content

Commit

Permalink
change data to dataloader
Browse files Browse the repository at this point in the history
  • Loading branch information
xrsrke committed Oct 8, 2023
1 parent 6f26709 commit f12afbe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ optimizer = torch.optim.Adam(model.parameters())
+ optimizer = DistributedOptimizer(optimizer)

dataset = load_dataset('goose')
data = torch.utils.data.DataLoader(dataset, shuffle=True)
dataloader = torch.utils.data.DataLoader(dataset, shuffle=True)

for epoch in range(10):
for source, targets in data:
for source, targets in dataloader:
- source = source.to(device)
- targets = targets.to(device)

Expand Down

0 comments on commit f12afbe

Please sign in to comment.