Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
vision
Commits
8071c177
Unverified
Commit
8071c177
authored
Jul 27, 2023
by
Philip Meier
Committed by
GitHub
Jul 27, 2023
Browse files
fix make_image (#7768)
parent
b9b7cfc6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
test/common_utils.py
test/common_utils.py
+2
-1
No files found.
test/common_utils.py
View file @
8071c177
...
@@ -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
,
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment