Skip to content

Instantly share code, notes, and snippets.

@culurciello
Last active August 29, 2015 14:22
Show Gist options
  • Select an option

  • Save culurciello/15a0aab62da5680734c9 to your computer and use it in GitHub Desktop.

Select an option

Save culurciello/15a0aab62da5680734c9 to your computer and use it in GitHub Desktop.
SSD torch7 batch test
--------------------------------------------------------------------------------
-- 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