Skip to content

Commit

Permalink
remove extra resizing layer
Browse files Browse the repository at this point in the history
  • Loading branch information
sineeli committed Feb 3, 2025
1 parent 7609c5b commit b6b1191
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions keras_hub/src/models/retinanet/retinanet_image_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ def __init__(
bounding_box_format="yxyx",
**kwargs,
):
super().__init__(image_size=image_size, **kwargs)
self.resizing_bbox = keras.layers.Resizing(
super().__init__(**kwargs)
self.resizing = keras.layers.Resizing(
height=image_size[0] if image_size else None,
width=image_size[1] if image_size else None,
bounding_box_format=bounding_box_format,
Expand All @@ -43,7 +43,7 @@ def __init__(
@preprocessing_function
def call(self, x, y=None, sample_weight=None):
if y is not None:
inputs = self.resizing_bbox({"images": x, "bounding_boxes": y})
inputs = self.resizing({"images": x, "bounding_boxes": y})
x = inputs["images"]
y = inputs["bounding_boxes"]
else:
Expand Down

0 comments on commit b6b1191

Please sign in to comment.