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

Fix a bug in random negate

This commit is contained in:
nagadomi 2016-10-24 17:23:09 +09:00
parent 74ed227f48
commit 6220afc31a

View file

@ -123,8 +123,8 @@ end
function data_augmentation.pairwise_negate(x, y, p)
if torch.uniform() < p then
assert(x:size(2) == y:size(2) and x:size(3) == y:size(3))
x = iproc.negate(x, r)
y = iproc.rotate(y, r)
x = iproc.negate(x)
y = iproc.negate(y)
return x, y
else
return x, y
@ -133,7 +133,7 @@ end
function data_augmentation.pairwise_negate_x(x, y, p)
if torch.uniform() < p then
assert(x:size(2) == y:size(2) and x:size(3) == y:size(3))
x = iproc.negate(x, r)
x = iproc.negate(x)
return x, y
else
return x, y