Skip to content

Commit 39b996d

Browse files
NicolasHugfacebook-github-bot
authored andcommitted
[fbsync] fix make_image (#7768)
Reviewed By: matteobettini Differential Revision: D48642304 fbshipit-source-id: 103fba520209fd0fc81ecc839e56cdea087b7981
1 parent 99ae2c3 commit 39b996d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/common_utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,12 +503,13 @@ def make_image(
503503
device="cpu",
504504
memory_format=torch.contiguous_format,
505505
):
506+
dtype = dtype or torch.uint8
506507
max_value = get_max_value(dtype)
507508
data = torch.testing.make_tensor(
508509
(*batch_dims, get_num_channels(color_space), *size),
509510
low=0,
510511
high=max_value,
511-
dtype=dtype or torch.uint8,
512+
dtype=dtype,
512513
device=device,
513514
memory_format=memory_format,
514515
)

0 commit comments

Comments
 (0)