浏览代码

Fix a bug in user method when scale=2

nagadomi 9 年之前
父节点
当前提交
b3c968ef11
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/pairwise_transform_user.lua

+ 1 - 1
lib/pairwise_transform_user.lua

@@ -33,7 +33,7 @@ function pairwise_transform.user(x, y, size, offset, n, options)
    local scale_y = y:size(2) / x:size(2)
    assert(x:size(3) == y:size(3) / scale_y)
 
-   x, y = crop_if_large(x, y, scale_y, options.max_size, options.scale, 2)
+   x, y = crop_if_large(x, y, scale_y, options.max_size, scale_y)
    assert(x:size(3) == y:size(3) / scale_y and x:size(2) == y:size(2) / scale_y)
    local batch = {}
    local lowres_y = gm.Image(y, "RGB", "DHW"):