diff --git a/python/paddle/fluid/initializer.py b/python/paddle/fluid/initializer.py index d867ac3b0eb239443ec9e0847234310b8a5bd094..fcfa1b62f38a4bc19af33aa97045383823230cd7 100644 --- a/python/paddle/fluid/initializer.py +++ b/python/paddle/fluid/initializer.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. +# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -689,11 +689,9 @@ class MSRAInitializer(Initializer): \frac{gain}{\sqrt{{fan\_in}}} Args: - uniform (bool): whether to use uniform or normal distribution - fan_in (float32|None): fan_in (in_features) of trainable Tensor,\ - If None, it will be infered automaticly. If you don't want to use in_features of the Tensor,\ - you can set the value of 'fan_in' smartly by yourself. default is None. - seed (int32): random seed + uniform (bool, optional): whether to use uniform or normal distribution + fan_in (float32|None, optional): fan_in (in_features) of trainable Tensor, If None, it will be infered automaticly. If you don't want to use in_features of the Tensor, you can set the value of 'fan_in' smartly by yourself. default is None. + seed (int32, optional): random seed. negative_slope (float, optional): negative_slope (only used with leaky_relu). default is 0.0. nonlinearity(str, optional): the non-linear function. default is relu. diff --git a/python/paddle/nn/initializer/kaiming.py b/python/paddle/nn/initializer/kaiming.py index ef34bc1785fde14788a85d45cad19ad0d04b2c26..38394eb5b93168e66929eed9e4490060edc5581e 100644 --- a/python/paddle/nn/initializer/kaiming.py +++ b/python/paddle/nn/initializer/kaiming.py @@ -1,4 +1,4 @@ -# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. +# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -36,9 +36,7 @@ class KaimingNormal(MSRAInitializer): \frac{gain}{\sqrt{{fan\_in}}} Args: - fan_in (float32|None): fan_in (in_features) of trainable Tensor,\ - If None, it will be infered automaticly. If you don't want to use in_features of the Tensor,\ - you can set the value of 'fan_in' smartly by yourself. default is None. + fan_in (float32|None, optional): fan_in (in_features) of trainable Tensor, If None, it will be infered automaticly. If you don't want to use in_features of the Tensor, you can set the value of 'fan_in' smartly by yourself. default is None. negative_slope (float, optional): negative_slope (only used with leaky_relu). default is 0.0. nonlinearity(str, optional): the non-linear function. default is relu. @@ -84,9 +82,7 @@ class KaimingUniform(MSRAInitializer): x = gain \times \sqrt{\frac{3}{fan\_in}} Args: - fan_in (float32|None): fan_in (in_features) of trainable Tensor,\ - If None, it will be infered automaticly. If you don't want to use in_features of the Tensor,\ - you can set the value of 'fan_in' smartly by yourself. default is None. + fan_in (float32|None, optional): fan_in (in_features) of trainable Tensor, If None, it will be infered automaticly. If you don't want to use in_features of the Tensor, you can set the value of 'fan_in' smartly by yourself. default is None. negative_slope (float, optional): negative_slope (only used with leaky_relu). default is 0.0. nonlinearity(str, optional): the non-linear function. default is relu.