UniformInit — mmengine 0.10.7 documentation (original) (raw)
class mmengine.model.UniformInit(a=0, b=1, **kwargs)[source]¶
Initialize module parameters with values drawn from the uniform distribution \(\mathcal{U}(a, b)\).
Parameters:
- a (int | float) – the lower bound of the uniform distribution. Defaults to 0.
- b (int | float) – the upper bound of the uniform distribution. Defaults to 1.
- bias (int | float) – the value to fill the bias. Defaults to 0.
- bias_prob (float, optional) – the probability for bias initialization. Defaults to None.
- layer (str | list_[_str] , optional) – the layer will be initialized. Defaults to None.