Skip to content

Commit

Permalink
pin dataloader memory
Browse files Browse the repository at this point in the history
  • Loading branch information
yjxiong committed Aug 16, 2017
1 parent bdd8742 commit ec8e52c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def main():
normalize,
])),
batch_size=args.batch_size, shuffle=True,
num_workers=args.workers, pin_memory=False)
num_workers=args.workers, pin_memory=True)

val_loader = torch.utils.data.DataLoader(
TSNDataSet("", args.val_list, num_segments=args.num_segments,
Expand All @@ -96,7 +96,7 @@ def main():
normalize,
])),
batch_size=args.batch_size, shuffle=False,
num_workers=args.workers, pin_memory=False)
num_workers=args.workers, pin_memory=True)

# define loss function (criterion) and optimizer
if args.loss_type == 'nll':
Expand Down

0 comments on commit ec8e52c

Please sign in to comment.