from __future__ import annotations

from typing import Any, Optional

from ..layer.common import Linear as Linear
from ..layer.conv import Conv1DTranspose as Conv1DTranspose
from ..layer.conv import Conv2DTranspose as Conv2DTranspose
from ..layer.conv import Conv3DTranspose as Conv3DTranspose

def normal_(x: Any, mean: float = ..., std: float = ...): ...

class SpectralNorm:
    name: Any = ...
    dim: Any = ...
    n_power_iterations: Any = ...
    eps: Any = ...
    def __init__(self, name: str = ..., n_power_iterations: int = ..., dim: int = ..., eps: float = ...) -> None: ...
    def reshape_weight_to_matrix(self, weight: Any): ...
    def compute_weight(self, layer: Any, do_power_iteration: Any): ...
    def __call__(self, layer: Any, inputs: Any) -> None: ...
    @staticmethod
    def apply(layer: Any, name: Any, n_power_iterations: Any, dim: Any, eps: Any): ...

def spectral_norm(
    layer: Any, name: str = ..., n_power_iterations: int = ..., eps: float = ..., dim: Optional[Any] = ...
): ...
