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
571f12ef
Commit
571f12ef
authored
May 17, 2022
by
Ziheng Qin
Committed by
binmakeswell
May 17, 2022
Browse files
[NFC] polish colossalai/nn/layer/utils/common.py code style (#983)
parent
bda70b4b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
colossalai/nn/layer/utils/common.py
colossalai/nn/layer/utils/common.py
+3
-1
No files found.
colossalai/nn/layer/utils/common.py
View file @
571f12ef
...
...
@@ -13,7 +13,8 @@ from torch import Tensor, nn
class
CheckpointModule
(
nn
.
Module
):
def
__init__
(
self
,
checkpoint
:
bool
=
True
,
offload
:
bool
=
False
):
def
__init__
(
self
,
checkpoint
:
bool
=
True
,
offload
:
bool
=
False
):
super
().
__init__
()
self
.
checkpoint
=
checkpoint
self
.
_use_checkpoint
=
checkpoint
...
...
@@ -78,6 +79,7 @@ def get_tensor_parallel_mode():
def
_ntuple
(
n
):
def
parse
(
x
):
if
isinstance
(
x
,
collections
.
abc
.
Iterable
):
return
x
...
...
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