Skip to content

Commit

Permalink
Open cuDNN benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
kuangliu committed Jan 24, 2017
1 parent dfa54c6 commit 3353b44
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
import torch.backends.cudnn as cudnn

import torchvision
import torchvision.transforms as transforms
Expand Down Expand Up @@ -63,6 +64,7 @@
if use_cuda:
net.cuda()
net = torch.nn.DataParallel(net, device_ids=[0,1,2,3])
cudnn.benchmark = True

criterion = nn.CrossEntropyLoss()
# optimizer = optim.SGD(net.parameters(), lr=args.lr, momentum=0.9, weight_decay=1e-4)
Expand Down

0 comments on commit 3353b44

Please sign in to comment.