Skip to content
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
8 changes: 6 additions & 2 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ function M.image(img, opts)
opts = opts or {}

if type(img) == 'table' then
return M.images(img, opts)
local result = M.images(img, opts)
torch.setdefaulttensortype(defaultType)
return result
end

-- img is a collection?
Expand All @@ -79,7 +81,9 @@ function M.image(img, opts)
for i = 1,img:size(1) do
images[i] = img[i]
end
return M.images(images, opts)
local result = M.images(images, opts)
torch.setdefaulttensortype(defaultType)
return result
end

img = normalize(img, opts)
Expand Down