Training: Remove test code from data loader.
This commit is contained in:
parent
ccaf423904
commit
49d195355b
|
@ -76,25 +76,24 @@ end
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
--[[ Section 2: Create a test data loader (testLoader), ]]--
|
--[[ Section 2: Create a test data loader (testLoader), ]]--
|
||||||
|
-- if opt.testEpochSize > 0 then
|
||||||
if opt.testEpochSize > 0 then
|
-- if paths.filep(testCache) then
|
||||||
if paths.filep(testCache) then
|
-- print('Loading test metadata from cache')
|
||||||
print('Loading test metadata from cache')
|
-- testLoader = torch.load(testCache)
|
||||||
testLoader = torch.load(testCache)
|
-- else
|
||||||
else
|
-- print('Creating test metadata')
|
||||||
print('Creating test metadata')
|
-- testLoader = dataLoader{
|
||||||
testLoader = dataLoader{
|
-- paths = {paths.concat(opt.data, 'val')},
|
||||||
paths = {paths.concat(opt.data, 'val')},
|
-- loadSize = loadSize,
|
||||||
loadSize = loadSize,
|
-- sampleSize = sampleSize,
|
||||||
sampleSize = sampleSize,
|
-- -- split = 0,
|
||||||
-- split = 0,
|
-- split = 100,
|
||||||
split = 100,
|
-- verbose = true,
|
||||||
verbose = true,
|
-- -- force consistent class indices between trainLoader and testLoader
|
||||||
-- force consistent class indices between trainLoader and testLoader
|
-- forceClasses = trainLoader.classes
|
||||||
forceClasses = trainLoader.classes
|
-- }
|
||||||
}
|
-- torch.save(testCache, testLoader)
|
||||||
torch.save(testCache, testLoader)
|
-- end
|
||||||
end
|
-- collectgarbage()
|
||||||
collectgarbage()
|
-- end
|
||||||
end
|
-- -- End of test loader section
|
||||||
-- End of test loader section
|
|
||||||
|
|
Loading…
Reference in New Issue