Unverified Commit 17ed3335 authored by YuliangLiu0306's avatar YuliangLiu0306 Committed by GitHub
Browse files

[hotfix] fix an assertion bug in base schedule. (#1250)

parent 97d71385
...@@ -117,9 +117,9 @@ class BaseSchedule(ABC): ...@@ -117,9 +117,9 @@ class BaseSchedule(ABC):
@staticmethod @staticmethod
def _call_engine_criterion(engine, outputs, labels): def _call_engine_criterion(engine, outputs, labels):
assert isinstance( assert isinstance(outputs,
outputs, (torch.Tensor, list, tuple,
(torch.Tensor, list, tuple)), f'Expect output of model is (torch.Tensor, list, tuple), got {type(outputs)}' dict)), f'Expect output of model is (torch.Tensor, list, tuple), got {type(outputs)}'
if isinstance(outputs, torch.Tensor): if isinstance(outputs, torch.Tensor):
outputs = (outputs,) outputs = (outputs,)
if isinstance(labels, torch.Tensor): if isinstance(labels, torch.Tensor):
......
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