Fix/format colossalai/engine/paramhooks/(#350)

This commit is contained in:
Xu Kai 2022-03-09 17:28:17 +08:00 committed by Frank Lee
parent e83970e3dc
commit 54ee8d1254
2 changed files with 8 additions and 5 deletions

View File

@ -1,2 +1,3 @@
from ._param_hookmgr import BaseParamHookMgr from ._param_hookmgr import BaseParamHookMgr
__all__ = ["BaseParamHookMgr"] __all__ = ["BaseParamHookMgr"]

View File

@ -2,7 +2,9 @@ from typing import Callable, List
import torch import torch
import functools import functools
class BaseParamHookMgr(object): class BaseParamHookMgr(object):
def __init__(self, param_list: List[torch.nn.Parameter]) -> None: def __init__(self, param_list: List[torch.nn.Parameter]) -> None:
r""" r"""
register backward hook on every parameters of module register backward hook on every parameters of module