From f586887a90cedc84b88c44b17fb1de9d1c99b249 Mon Sep 17 00:00:00 2001 From: DouJS Date: Thu, 8 Sep 2022 16:23:04 +0800 Subject: [PATCH] [NFC] polish colossalai/nn/layer/colossalai_layer/dropout.py code style (#1568) --- colossalai/nn/layer/colossalai_layer/dropout.py | 1 + 1 file changed, 1 insertion(+) diff --git a/colossalai/nn/layer/colossalai_layer/dropout.py b/colossalai/nn/layer/colossalai_layer/dropout.py index 0df6698d5..cc2d9a0a7 100644 --- a/colossalai/nn/layer/colossalai_layer/dropout.py +++ b/colossalai/nn/layer/colossalai_layer/dropout.py @@ -13,6 +13,7 @@ class Dropout(ColossalaiModule): p (float, optional): probability of an element to be zeroed, defaults 0.5. inplace (bool, optional): whether to do dropout in-place, default to be False. """ + def __init__(self, p: float = 0.5, inplace: bool = False) -> None: tensor_parallel = get_tensor_parallel_mode() if tensor_parallel == "1d":