Skip to content

Commit 9148c52

Browse files
author
Daniel Flores
committed
reflect comments
1 parent 6c96b2e commit 9148c52

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

test/generate_reference_resources.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
#!/usr/bin/env python3
1+
# Copyright (c) Meta Platforms, Inc. and affiliates.
2+
# All rights reserved.
3+
#
4+
# This source code is licensed under the BSD-style license found in the
5+
# LICENSE file in the root directory of this source tree.
6+
27
import os
38
import subprocess
49

@@ -7,12 +12,6 @@
712
import torch
813
from PIL import Image
914

10-
# Copyright (c) Meta Platforms, Inc. and affiliates.
11-
# All rights reserved.
12-
#
13-
# This source code is licensed under the BSD-style license found in the
14-
# LICENSE file in the root directory of this source tree.
15-
1615
# Run this script to update the resources used in unit tests. The resources are all derived
1716
# from source media already checked into the repo.
1817

@@ -24,8 +23,6 @@ def convert_image_to_tensor(image_path):
2423
base_filename = os.path.splitext(image_path)[0]
2524
pil_image = Image.open(image_path)
2625
img_tensor = torch.from_numpy(np.asarray(pil_image))
27-
print(img_tensor.shape)
28-
print(img_tensor.dtype)
2926
# Save tensor to disk
3027
torch.save(img_tensor, base_filename + ".pt", _use_new_zipfile_serialization=True)
3128
os.remove(image_path)

0 commit comments

Comments
 (0)