Просмотр исходного кода

Fix a bug in reconstrct.scale() when inner_scale > 1 && y only model

nagadomi 9 лет назад
Родитель
Сommit
c028ce6e4f
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      lib/reconstruct.lua

+ 1 - 1
lib/reconstruct.lua

@@ -96,7 +96,7 @@ function reconstruct.scale_y(model, scale, x, offset, block_size, upsampling_fil
    block_size = block_size or 128
    local x_lanczos
    if reconstruct.has_resize(model) then
-      x_lanczos = x:clone()
+      x_lanczos = iproc.scale(x, x:size(3) * scale, x:size(2) * scale, "Lanczos")
    else
       x_lanczos = iproc.scale(x, x:size(3) * scale, x:size(2) * scale, "Lanczos")
       x = iproc.scale(x, x:size(3) * scale, x:size(2) * scale, upsampling_filter)