Skip to content

Commit

Permalink
Update mmengine/dist/utils.py
Browse files Browse the repository at this point in the history
Co-authored-by: Zaida Zhou <[email protected]>
  • Loading branch information
HAOCHENYE and zhouzaida authored Nov 2, 2024
1 parent 3cc9e0a commit 99c43c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mmengine/dist/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ def cast_data_device(
Tensor or list or dict: ``data`` was casted to ``device``.
"""
if out is not None:
if type(data) is type(out):
if type(data) is not type(out):
raise TypeError(
'out should be the same type with data, but got data is '
f'{type(data)} and out is {type(data)}')
Expand Down

0 comments on commit 99c43c8

Please sign in to comment.