Browse Source

Fix a bug in user method when scale=2

nagadomi 9 years ago
parent
commit
b3c968ef11
1 changed files with 1 additions and 1 deletions
  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"):