from __future__ import annotations

from typing import Any, Optional

from ... import fluid as fluid
from ...fluid import dygraph as dygraph
from ...fluid.data_feeder import check_variable_and_dtype as check_variable_and_dtype
from ...fluid.layer_helper import LayerHelper as LayerHelper

def l2_norm(x: Any, axis: Any, epsilon: float = ..., name: Optional[Any] = ...): ...
def norm_except_dim(p: Any, dim: Any): ...

class WeightNorm:
    name: Any = ...
    dim: Any = ...
    def __init__(self, name: Any, dim: Any) -> None: ...
    def compute_weight(self, layer: Any): ...
    @staticmethod
    def apply(layer: Any, name: Any, dim: Any): ...
    def remove(self, layer: Any) -> None: ...
    def __call__(self, layer: Any, inputs: Any) -> None: ...

def weight_norm(layer: Any, name: str = ..., dim: int = ...): ...
def remove_weight_norm(layer: Any, name: str = ...): ...
