from __future__ import annotations

from typing import Any, Optional

class BaseErrorClipAttr: ...

class ErrorClipByValue(BaseErrorClipAttr):
    max: Any = ...
    min: Any = ...
    def __init__(self, max: Any, min: Optional[Any] = ...) -> None: ...

class ClipGradBase:
    def __init__(self) -> None: ...
    def __call__(self, params_grads: Any): ...

class ClipGradByValue(ClipGradBase):
    max: Any = ...
    min: Any = ...
    def __init__(self, max: Any, min: Optional[Any] = ...) -> None: ...

class ClipGradByNorm(ClipGradBase):
    clip_norm: Any = ...
    def __init__(self, clip_norm: Any) -> None: ...

class ClipGradByGlobalNorm(ClipGradBase):
    clip_norm: Any = ...
    group_name: Any = ...
    auto_skip_clip: Any = ...
    def __init__(self, clip_norm: Any, group_name: str = ..., auto_skip_clip: bool = ...) -> None: ...

def set_gradient_clip(clip: Any, param_list: Optional[Any] = ..., program: Optional[Any] = ...) -> None: ...

GradientClipBase = ClipGradBase
GradientClipByValue = ClipGradByValue
GradientClipByNorm = ClipGradByNorm
GradientClipByGlobalNorm = ClipGradByGlobalNorm
