Skip to content

Commit b858b7f

Browse files
jdsgomesdatumbox
authored andcommitted
[fbsync] Added center as top-left for shear X/Y ops for autoaugment (#5285)
Summary: Fixes #5204 Reviewed By: NicolasHug Differential Revision: D34140243 fbshipit-source-id: 0b7c01b3479d5ef0eb9dfab64e317bb31eff0b31 Co-authored-by: Vasilis Vryniotis <[email protected]>
1 parent 9642c8e commit b858b7f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

torchvision/transforms/autoaugment.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ def _apply_op(
2222
shear=[math.degrees(magnitude), 0.0],
2323
interpolation=interpolation,
2424
fill=fill,
25+
center=[0, 0],
2526
)
2627
elif op_name == "ShearY":
2728
img = F.affine(
@@ -32,6 +33,7 @@ def _apply_op(
3233
shear=[0.0, math.degrees(magnitude)],
3334
interpolation=interpolation,
3435
fill=fill,
36+
center=[0, 0],
3537
)
3638
elif op_name == "TranslateX":
3739
img = F.affine(

0 commit comments

Comments
 (0)