Last active
August 29, 2015 14:06
-
-
Save soumith/c10bc2ad64e5facccf7d to your computer and use it in GitHub Desktop.
This file contains 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
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