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
ColossalAI
Commits
17ed3335
Unverified
Commit
17ed3335
authored
Jul 12, 2022
by
YuliangLiu0306
Committed by
GitHub
Jul 12, 2022
Browse files
[hotfix] fix an assertion bug in base schedule. (#1250)
parent
97d71385
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
colossalai/engine/schedule/_base_schedule.py
colossalai/engine/schedule/_base_schedule.py
+3
-3
No files found.
colossalai/engine/schedule/_base_schedule.py
View file @
17ed3335
...
...
@@ -117,9 +117,9 @@ class BaseSchedule(ABC):
@
staticmethod
def
_call_engine_criterion
(
engine
,
outputs
,
labels
):
assert
isinstance
(
outputs
,
(
torch
.
Tensor
,
list
,
tuple
)),
f
'Expect output of model is (torch.Tensor, list, tuple), got
{
type
(
outputs
)
}
'
assert
isinstance
(
outputs
,
(
torch
.
Tensor
,
list
,
tuple
,
dict
)),
f
'Expect output of model is (torch.Tensor, list, tuple), got
{
type
(
outputs
)
}
'
if
isinstance
(
outputs
,
torch
.
Tensor
):
outputs
=
(
outputs
,)
if
isinstance
(
labels
,
torch
.
Tensor
):
...
...
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