瀏覽代碼

Remove unused variable

nagadomi 9 年之前
父節點
當前提交
b63e08905b
共有 2 個文件被更改,包括 1 次插入6 次删除
  1. 0 1
      lib/pairwise_transform.lua
  2. 1 5
      web.lua

+ 0 - 1
lib/pairwise_transform.lua

@@ -52,7 +52,6 @@ local function active_cropping(x, y, size, p, tries)
       local yc = iproc.crop(y, xi, yi, xi + size, yi + size)
       return xc, yc
    else
-      local samples = {}
       local best_se = 0.0
       local best_xc, best_yc
       local m = torch.FloatTensor(x:size(1), size, size)

+ 1 - 5
web.lua

@@ -90,12 +90,8 @@ end
 local function get_image(req)
    local file = req:get_argument("file", "")
    local url = req:get_argument("url", "")
-   local blob = nil
-   local img = nil
-   local alpha = nil
    if file and file:len() > 0 then
-      blob = file
-      return image_loader.decode_float(blob)
+      return image_loader.decode_float(file)
    elseif url and url:len() > 0 then
       return cache_url(url)
    end