Last active
August 29, 2015 14:22
-
-
Save culurciello/15a0aab62da5680734c9 to your computer and use it in GitHub Desktop.
SSD torch7 batch test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -------------------------------------------------------------------------------- | |
| -- E. Culurciello SSD speed test for batch 128 | |
| ------------------------------------------------------------------------------- | |
| print('SSD test program in for Torch7 batches') | |
| torch.manualSeed(1) | |
| torch.setdefaulttensortype('torch.FloatTensor') | |
| torch.setnumthreads(8) | |
| -- save batch data to load all times: | |
| local batch = torch.Tensor(128, 3, 231, 231) | |
| torch.save('batch.t7', batch) | |
| for i=1, 10 do | |
| -- load | |
| local timer_tr = torch.Timer() | |
| batch = torch.load('batch.t7') | |
| loadTime = timer_tr:time().real | |
| print('load time: ', loadTime) | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment