-
Notifications
You must be signed in to change notification settings - Fork 577
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add PyTorch Benchmarks #121
Comments
My device specs: NVIDIA GTX 1060, Cuda 8.0, Cudnn: v5 I downloaded some folders from Imagenet. Loaded pre-trained alexnet model and pass images through the network with BatchSize=128. I use inbuilt torch dataloader to load jpeg images. I am getting 7ms as forward pass which is very fast. I am not sure what I am calculating is correct forward pass time. Please help ! Please look at the code and logs here: https://github.com/HarshaVardhanP/Random |
Using PyTorch example (https://github.com/pytorch/examples/blob/master/imagenet/main.py) with pretrained alexnet and evaluate mode using same data (Batchsize=128). Logs look like these: => using pre-trained model 'alexnet'
I can observe, this code includes data loading time as well while calculating batch time. So, it is 200ms per batch which is slower compared to TF. Please share how to estimate correct forward pass time in PyTorch? |
@HarshaVardhanP I am running a Titan X pascal. Running the script you linked to (https://github.com/HarshaVardhanP/Random) I see an average forward time of around 88ms on pytorch+alexnet. I did increase num_workers to 12 and let it run for more then 20 steps. The second script you link to also has a backprop + optimization step... that is probably why you see an increased step time. |
@lolz0r Thanks for your comment.
|
you need to add two lines to the near top of your script:
That will turn on the cudnn autotuner that selects efficient algorithms. Secondly, convnet-benchmarks itself is based on synthetic data, so if you want to simulate that you simply use dummy data. Here's is your script partly modified to do so.
|
No description provided.
The text was updated successfully, but these errors were encountered: