diff --git a/sdks/python/apache_beam/examples/inference/pytorch_image_object_detection.py b/sdks/python/apache_beam/examples/inference/pytorch_image_object_detection.py index a8eef5a7d5e7..3279aaf4b4e1 100644 --- a/sdks/python/apache_beam/examples/inference/pytorch_image_object_detection.py +++ b/sdks/python/apache_beam/examples/inference/pytorch_image_object_detection.py @@ -431,7 +431,8 @@ def run( model_params={}, state_dict_path=known_args.model_state_dict_path, device=device, - inference_batch_size=batch_size, + min_batch_size=batch_size, + max_batch_size=batch_size, inference_fn=_torchvision_detection_inference_fn, )