Skip to content

Instantly share code, notes, and snippets.

@soumith
Last active August 29, 2015 14:06
Show Gist options
  • Save soumith/c10bc2ad64e5facccf7d to your computer and use it in GitHub Desktop.
Save soumith/c10bc2ad64e5facccf7d to your computer and use it in GitHub Desktop.
do
require 'torch'
local ffi = require 'ffi'
local argcheck = require 'argcheck'
local dataset = torch.class('torch.dataset')
local initcheck = argcheck{
pack=true,
{name="paths", type="table", help="Multiple paths of directories with images"},
{name="sampleSize", type="table", help="a consistent sample size to resize the images"},
{name="loadSize", type="table", help="a size to load the images to, initially", opt = true},
{name="split", type="number", help="Percentage of split to go to Training", default = 90},
}
function dataset:__init(...)
-- argcheck
local args = initcheck(...)
print(args)
end
end
dataset = torch.dataset{paths={'../../toyset'}, sampleSize = {3, 100, 100}, split=15}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment