Skip to content

Commit 5ddae9e

Browse files
jdsgomesfacebook-github-bot
authored andcommitted
[fbsync] [proto] Updated center_crop tests (#6272)
Summary: * [proto] Added missing decorator for center_crop_segmentation_mask tests * Added center_crop_image_tensor Reviewed By: datumbox Differential Revision: D38154569 fbshipit-source-id: 5554f292ba56aa0f4919e9a4cfe71c564d6b91b3
1 parent b3289d0 commit 5ddae9e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/test_prototype_transforms_functional.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,15 @@ def perspective_segmentation_mask():
487487
)
488488

489489

490+
@register_kernel_info_from_sample_inputs_fn
491+
def center_crop_image_tensor():
492+
for image, output_size in itertools.product(
493+
make_images(sizes=((16, 16), (7, 33), (31, 9))),
494+
[[4, 3], [42, 70], [4]], # crop sizes < image sizes, crop_sizes > image sizes, single crop size
495+
):
496+
yield SampleInput(image, output_size)
497+
498+
490499
@register_kernel_info_from_sample_inputs_fn
491500
def center_crop_bounding_box():
492501
for bounding_box, output_size in itertools.product(make_bounding_boxes(), [(24, 12), [16, 18], [46, 48], [12]]):
@@ -495,6 +504,7 @@ def center_crop_bounding_box():
495504
)
496505

497506

507+
@register_kernel_info_from_sample_inputs_fn
498508
def center_crop_segmentation_mask():
499509
for mask, output_size in itertools.product(
500510
make_segmentation_masks(image_sizes=((16, 16), (7, 33), (31, 9))),

0 commit comments

Comments
 (0)