Unverified Commit 8071c177 authored by Philip Meier's avatar Philip Meier Committed by GitHub
Browse files

fix make_image (#7768)

parent b9b7cfc6
...@@ -503,12 +503,13 @@ def make_image( ...@@ -503,12 +503,13 @@ def make_image(
device="cpu", device="cpu",
memory_format=torch.contiguous_format, memory_format=torch.contiguous_format,
): ):
dtype = dtype or torch.uint8
max_value = get_max_value(dtype) max_value = get_max_value(dtype)
data = torch.testing.make_tensor( data = torch.testing.make_tensor(
(*batch_dims, get_num_channels(color_space), *size), (*batch_dims, get_num_channels(color_space), *size),
low=0, low=0,
high=max_value, high=max_value,
dtype=dtype or torch.uint8, dtype=dtype,
device=device, device=device,
memory_format=memory_format, memory_format=memory_format,
) )
......
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