Merge branch 'dev'
This commit is contained in:
commit
5fe6cf6ef8
|
@ -52,7 +52,12 @@ function pairwise_transform.user(x, y, size, offset, n, options)
|
|||
xc:add(-mean)
|
||||
end
|
||||
end
|
||||
table.insert(batch, {xc, iproc.crop(yc, offset, offset, size - offset, size - offset)})
|
||||
yc = iproc.crop(yc, offset, offset, size - offset, size - offset)
|
||||
if options.pairwise_y_binary then
|
||||
yc[torch.lt(yc, 0.5)] = 0
|
||||
yc[torch.gt(yc, 0)] = 1
|
||||
end
|
||||
table.insert(batch, {xc, yc})
|
||||
end
|
||||
|
||||
return batch
|
||||
|
|
|
@ -108,12 +108,6 @@ function pairwise_transform_utils.preprocess_user(x, y, scale_y, size, options)
|
|||
|
||||
x = iproc.crop_mod4(x)
|
||||
y = iproc.crop_mod4(y)
|
||||
|
||||
if options.pairwise_y_binary then
|
||||
y[torch.lt(y, 128)] = 0
|
||||
y[torch.gt(y, 0)] = 255
|
||||
end
|
||||
|
||||
return x, y
|
||||
end
|
||||
function pairwise_transform_utils.active_cropping(x, y, lowres_y, size, scale, p, tries)
|
||||
|
|
Loading…
Reference in a new issue