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
MMCV
Commits
fccb1091
"git@developer.sourcefind.cn:norm/vllm.git" did not exist on "cf5cb1e33eed16b2f0d5fe6268bf5705a4d0ea5a"
Unverified
Commit
fccb1091
authored
Feb 18, 2022
by
Jiazhen Wang
Committed by
GitHub
Feb 18, 2022
Browse files
Imporve the docstring of imfrombytes and fix a deprecation-warning (#1731)
parent
c1de4c9b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
mmcv/image/io.py
mmcv/image/io.py
+2
-0
mmcv/runner/hooks/logger/text.py
mmcv/runner/hooks/logger/text.py
+1
-1
No files found.
mmcv/image/io.py
View file @
fccb1091
...
...
@@ -213,6 +213,8 @@ def imfrombytes(content, flag='color', channel_order='bgr', backend=None):
Args:
content (bytes): Image bytes got from files or other streams.
flag (str): Same as :func:`imread`.
channel_order (str): The channel order of the output, candidates
are 'bgr' and 'rgb'. Default to 'bgr'.
backend (str | None): The image decoding backend type. Options are
`cv2`, `pillow`, `turbojpeg`, `tifffile`, `None`. If backend is
None, the global imread_backend specified by ``mmcv.use_backend()``
...
...
mmcv/runner/hooks/logger/text.py
View file @
fccb1091
...
...
@@ -109,7 +109,7 @@ class TextLoggerHook(LoggerHook):
def
_get_max_memory
(
self
,
runner
):
device
=
getattr
(
runner
.
model
,
'output_device'
,
None
)
mem
=
torch
.
cuda
.
max_memory_allocated
(
device
=
device
)
mem_mb
=
torch
.
tensor
([
mem
/
(
1024
*
1024
)],
mem_mb
=
torch
.
tensor
([
int
(
mem
)
/
/
(
1024
*
1024
)],
dtype
=
torch
.
int
,
device
=
device
)
if
runner
.
world_size
>
1
:
...
...
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