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
f2da21a8
Commit
f2da21a8
authored
Mar 31, 2022
by
doubleHU
Committed by
binmakeswell
Apr 06, 2022
Browse files
fix format (#586)
parent
ffad81e1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
0 deletions
+2
-0
colossalai/engine/gradient_handler/_base_gradient_handler.py
colossalai/engine/gradient_handler/_base_gradient_handler.py
+1
-0
colossalai/engine/ophooks/_base_ophook.py
colossalai/engine/ophooks/_base_ophook.py
+1
-0
No files found.
colossalai/engine/gradient_handler/_base_gradient_handler.py
View file @
f2da21a8
...
...
@@ -12,6 +12,7 @@ class BaseGradientHandler(ABC):
model (Module): Model where the gradients accumulate.
optimizer (Optimizer): Optimizer for updating the parameters.
"""
def
__init__
(
self
,
model
,
optimizer
):
self
.
_model
=
model
self
.
_optimizer
=
optimizer
...
...
colossalai/engine/ophooks/_base_ophook.py
View file @
f2da21a8
...
...
@@ -5,6 +5,7 @@ import torch
class
BaseOpHook
(
ABC
):
"""This class allows users to add customized operations
before and after the execution of a PyTorch submodule"""
def
__init__
(
self
):
pass
...
...
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