Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Made the used vars local. #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions dataset/mnist.lua
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,14 @@ end
-- -- use the test data rather than the training data:
-- m = dataset.Mnist({test = true})
function Mnist.dataset(opts)
local scale, normalize, zca_whiten, size, frames, rotation, translation, zoom
opts = opts or {}
test = arg.optional(opts, 'test', false)
scale = arg.optional(opts, 'scale', {})
normalize = arg.optional(opts, 'normalize', false)
zca_whiten = arg.optional(opts, 'zca_whiten', false)
size = arg.optional(opts, 'size', test and Mnist.test_size or Mnist.size)
sort = arg.optional(opts, 'sort', false)
transform = arg.optional(opts, 'sort', nil)
opts = opts or {}
local test = arg.optional(opts, 'test', false)
local scale = arg.optional(opts, 'scale', {})
local normalize = arg.optional(opts, 'normalize', false)
local zca_whiten = arg.optional(opts, 'zca_whiten', false)
local size = arg.optional(opts, 'size', test and Mnist.test_size or Mnist.size)
local sort = arg.optional(opts, 'sort', false)
local transform = arg.optional(opts, 'sort', nil)

local transformations = {}

Expand Down