We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3cc9e0a commit 99c43c8Copy full SHA for 99c43c8
mmengine/dist/utils.py
@@ -563,7 +563,7 @@ def cast_data_device(
563
Tensor or list or dict: ``data`` was casted to ``device``.
564
"""
565
if out is not None:
566
- if type(data) is type(out):
+ if type(data) is not type(out):
567
raise TypeError(
568
'out should be the same type with data, but got data is '
569
f'{type(data)} and out is {type(data)}')
0 commit comments