Unverified Commit af54e564 authored by Nicolas Hug's avatar Nicolas Hug Committed by GitHub
Browse files

[FBcode->GH] Fix GRACE_HOPPER file internal discovery (#6719)


Co-authored-by: default avatarVasilis Vryniotis <datumbox@users.noreply.github.com>
parent 6e203b44
...@@ -44,9 +44,11 @@ def _get_image(input_shape, real_image, device): ...@@ -44,9 +44,11 @@ def _get_image(input_shape, real_image, device):
To do so, a keyword argument `real_image` was added to the abovelisted models in `_model_params` To do so, a keyword argument `real_image` was added to the abovelisted models in `_model_params`
""" """
if real_image: if real_image:
GRACE_HOPPER = get_relative_path( # TODO: Maybe unify file discovery logic with test_image.py
os.path.dirname(os.path.realpath(__file__)), "test", "assets", "encode_jpeg", "grace_hopper_517x606.jpg" GRACE_HOPPER = os.path.join(
os.path.dirname(os.path.abspath(__file__)), "assets", "encode_jpeg", "grace_hopper_517x606.jpg"
) )
img = Image.open(GRACE_HOPPER) img = Image.open(GRACE_HOPPER)
original_width, original_height = img.size original_width, original_height = img.size
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment