Fix incorrect shape in ResizeLongestSide.apply_image_torch.
This commit is contained in:
parent
02acff7859
commit
567662b0fd
@ -59,7 +59,7 @@ class ResizeLongestSide:
|
|||||||
the transformation expected by the model.
|
the transformation expected by the model.
|
||||||
"""
|
"""
|
||||||
# Expects an image in BCHW format. May not exactly match apply_image.
|
# Expects an image in BCHW format. May not exactly match apply_image.
|
||||||
target_size = self.get_preprocess_shape(image.shape[0], image.shape[1], self.target_length)
|
target_size = self.get_preprocess_shape(image.shape[2], image.shape[3], self.target_length)
|
||||||
return F.interpolate(
|
return F.interpolate(
|
||||||
image, target_size, mode="bilinear", align_corners=False, antialias=True
|
image, target_size, mode="bilinear", align_corners=False, antialias=True
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user