1
0
Fork 0
mirror of synced 2024-05-19 20:32:22 +12:00

Fix a bug in user method when scale=2

This commit is contained in:
nagadomi 2016-07-20 14:06:17 +09:00
parent 0b40d7db3f
commit b3c968ef11

View file

@ -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"):