1
0
Fork 0
mirror of synced 2024-05-16 19:02:21 +12:00

Change downsampling filters in pairwise_scale()

This commit is contained in:
nagadomi 2017-02-26 09:01:26 +09:00
parent 34874ec733
commit ed12b43477

View file

@ -102,7 +102,9 @@ function data_augmentation.pairwise_scale(x, y, p, scale_min, scale_max)
local scale = torch.uniform(scale_min, scale_max)
local h = math.floor(x:size(2) * scale)
local w = math.floor(x:size(3) * scale)
x = iproc.scale(x, w, h, "Triangle")
local filters = {"Lanczos", "Catrom"}
local x_filter = filters[torch.random(1, 2)]
x = iproc.scale(x, w, h, x_filter)
y = iproc.scale(y, w, h, "Triangle")
return x, y
else