#!/usr/bin/env python
# -*- coding: utf-8 -*-

from typing import TYPE_CHECKING

if TYPE_CHECKING:
    # Re-import for language servers
    from . import functional as functional
    from . import modules as modules
    from .modules import (
        CELU,
        ELU,
        FFT,
        GELU,
        GLU,
        GRU,
        IFFT,
        LSTM,
        RNN,
        SELU,
        Abs,
        AdaptiveAvgPool1d,
        AdaptiveAvgPool2d,
        AdaptiveAvgPool3d,
        AdaptiveLogSoftmaxWithLoss,
        AdaptiveMaxPool1d,
        AdaptiveMaxPool2d,
        AdaptiveMaxPool3d,
        AlphaDropout,
        Angle,
        AsTensor,
        AvgPool1d,
        AvgPool2d,
        AvgPool3d,
        BatchNorm1d,
        BatchNorm2d,
        BatchNorm3d,
        BCELoss,
        BCEWithLogitsLoss,
        Bilinear,
        ChannelShuffle,
        ConstantPad1d,
        ConstantPad2d,
        ConstantPad3d,
        Conv1d,
        Conv2d,
        Conv3d,
        ConvTranspose1d,
        ConvTranspose2d,
        ConvTranspose3d,
        CosineEmbeddingLoss,
        CosineSimilarity,
        CropDim,
        CropDims,
        CrossEntropyLoss,
        CrossMapLRN2d,
        CTCLoss,
        Dropout,
        Dropout2d,
        Dropout3d,
        Embedding,
        EmbeddingBag,
        EModule,
        EModuleDict,
        EModuleList,
        EModulePartial,
        ESequential,
        Exp,
        Exp2,
        FeatureAlphaDropout,
        Flatten,
        Fold,
        FractionalMaxPool2d,
        FractionalMaxPool3d,
        GaussianNLLLoss,
        GroupNorm,
        GRUCell,
        Hardshrink,
        Hardsigmoid,
        Hardswish,
        Hardtanh,
        HingeEmbeddingLoss,
        HuberLoss,
        Identity,
        Imag,
        IndexToName,
        IndexToOnehot,
        IndicesToMultihot,
        IndicesToMultinames,
        InstanceNorm1d,
        InstanceNorm2d,
        InstanceNorm3d,
        KLDivLoss,
        L1Loss,
        LayerNorm,
        LazyBatchNorm1d,
        LazyBatchNorm2d,
        LazyBatchNorm3d,
        LazyConv1d,
        LazyConv2d,
        LazyConv3d,
        LazyConvTranspose1d,
        LazyConvTranspose2d,
        LazyConvTranspose3d,
        LazyInstanceNorm1d,
        LazyInstanceNorm2d,
        LazyInstanceNorm3d,
        LazyLinear,
        LeakyReLU,
        Linear,
        LocalResponseNorm,
        Log,
        Log2,
        Log10,
        LogSigmoid,
        LogSoftmax,
        LogSoftmaxMultidim,
        LPPool1d,
        LPPool2d,
        LSTMCell,
        MarginRankingLoss,
        MaskedMean,
        MaskedSum,
        Max,
        MaxPool1d,
        MaxPool2d,
        MaxPool3d,
        MaxUnpool1d,
        MaxUnpool2d,
        MaxUnpool3d,
        Mean,
        Min,
        Mish,
        Module,
        ModuleDict,
        ModuleList,
        ModulePartial,
        MoveToRec,
        MSELoss,
        MultiheadAttention,
        MultihotToIndices,
        MultihotToMultiIndices,
        MultihotToMultinames,
        MultiIndicesToMultihot,
        MultiIndicesToMultinames,
        MultiLabelMarginLoss,
        MultiLabelSoftMarginLoss,
        MultilabelToPowerset,
        MultiMarginLoss,
        MultinamesToIndices,
        MultinamesToMultihot,
        MultinamesToMultiIndices,
        NameToIndex,
        NameToOnehot,
        NDArrayToTensor,
        NLLLoss,
        Normalize,
        OnehotToIndex,
        OnehotToName,
        PadAndCropDim,
        PadAndStackRec,
        PadDim,
        PadDims,
        PairwiseDistance,
        ParameterDict,
        ParameterList,
        Permute,
        PixelShuffle,
        PixelUnshuffle,
        PoissonNLLLoss,
        PositionalEncoding,
        Pow,
        PowersetToMultilabel,
        PReLU,
        ProbsToIndex,
        ProbsToIndices,
        ProbsToMultihot,
        ProbsToMultiIndices,
        ProbsToMultinames,
        ProbsToName,
        ProbsToOnehot,
        Real,
        ReflectionPad1d,
        ReflectionPad2d,
        ReflectionPad3d,
        ReLU,
        ReLU6,
        Repeat,
        RepeatInterleave,
        RepeatInterleaveNd,
        ReplicationPad1d,
        ReplicationPad2d,
        ReplicationPad3d,
        ResampleNearestFreqs,
        ResampleNearestRates,
        ResampleNearestSteps,
        Reshape,
        RNNBase,
        RNNCell,
        RNNCellBase,
        RReLU,
        Sequential,
        Shuffled,
        Sigmoid,
        SiLU,
        SmoothL1Loss,
        SoftMarginLoss,
        Softmax,
        Softmax2d,
        SoftmaxMultidim,
        Softmin,
        Softplus,
        Softshrink,
        Softsign,
        Sort,
        Squeeze,
        SyncBatchNorm,
        Tanh,
        Tanhshrink,
        TensorTo,
        TensorToNDArray,
        TFlatten,
        Threshold,
        ToItem,
        ToList,
        ToNDArray,
        Topk,
        TopP,
        ToTensor,
        TransformDrop,
        Transformer,
        TransformerDecoder,
        TransformerDecoderLayer,
        TransformerEncoder,
        TransformerEncoderLayer,
        Transpose,
        TripletMarginLoss,
        TripletMarginWithDistanceLoss,
        Unflatten,
        Unfold,
        Unsqueeze,
        Upsample,
        UpsamplingBilinear2d,
        UpsamplingNearest2d,
        View,
        ViewAsComplex,
        ViewAsReal,
        ZeroPad2d,
    )

else:
    import lazy_loader as lazy

    __getattr__, __dir__, __all__ = lazy.attach(
        __name__,
        submodules=["functional", "modules"],
        submod_attrs={
            "modules": [
                "AdaptiveAvgPool1d",
                "AdaptiveAvgPool2d",
                "AdaptiveAvgPool3d",
                "AdaptiveLogSoftmaxWithLoss",
                "AdaptiveMaxPool1d",
                "AdaptiveMaxPool2d",
                "AdaptiveMaxPool3d",
                "AlphaDropout",
                "AvgPool1d",
                "AvgPool2d",
                "AvgPool3d",
                "BCELoss",
                "BCEWithLogitsLoss",
                "BatchNorm1d",
                "BatchNorm2d",
                "BatchNorm3d",
                "Bilinear",
                "CELU",
                "CTCLoss",
                "ChannelShuffle",
                "ConstantPad1d",
                "ConstantPad2d",
                "ConstantPad3d",
                "Conv1d",
                "Conv2d",
                "Conv3d",
                "ConvTranspose1d",
                "ConvTranspose2d",
                "ConvTranspose3d",
                "CosineEmbeddingLoss",
                "CosineSimilarity",
                "CrossEntropyLoss",
                "CrossMapLRN2d",
                "Dropout",
                "Dropout2d",
                "Dropout3d",
                "ELU",
                "Embedding",
                "EmbeddingBag",
                "FeatureAlphaDropout",
                "Flatten",
                "Fold",
                "FractionalMaxPool2d",
                "FractionalMaxPool3d",
                "GELU",
                "GLU",
                "GRU",
                "GRUCell",
                "GaussianNLLLoss",
                "GroupNorm",
                "Hardshrink",
                "Hardsigmoid",
                "Hardswish",
                "Hardtanh",
                "HingeEmbeddingLoss",
                "HuberLoss",
                "Identity",
                "InstanceNorm1d",
                "InstanceNorm2d",
                "InstanceNorm3d",
                "KLDivLoss",
                "L1Loss",
                "LPPool1d",
                "LPPool2d",
                "LSTM",
                "LSTMCell",
                "LayerNorm",
                "LazyBatchNorm1d",
                "LazyBatchNorm2d",
                "LazyBatchNorm3d",
                "LazyConv1d",
                "LazyConv2d",
                "LazyConv3d",
                "LazyConvTranspose1d",
                "LazyConvTranspose2d",
                "LazyConvTranspose3d",
                "LazyInstanceNorm1d",
                "LazyInstanceNorm2d",
                "LazyInstanceNorm3d",
                "LazyLinear",
                "LeakyReLU",
                "Linear",
                "LocalResponseNorm",
                "LogSigmoid",
                "LogSoftmax",
                "MSELoss",
                "MarginRankingLoss",
                "MaxPool1d",
                "MaxPool2d",
                "MaxPool3d",
                "MaxUnpool1d",
                "MaxUnpool2d",
                "MaxUnpool3d",
                "Mish",
                "Module",
                "ModuleDict",
                "ModuleList",
                "MultiLabelMarginLoss",
                "MultiLabelSoftMarginLoss",
                "MultiMarginLoss",
                "MultiheadAttention",
                "NLLLoss",
                "PReLU",
                "PairwiseDistance",
                "ParameterDict",
                "ParameterList",
                "PixelShuffle",
                "PixelUnshuffle",
                "PoissonNLLLoss",
                "RNN",
                "RNNBase",
                "RNNCell",
                "RNNCellBase",
                "RReLU",
                "ReLU",
                "ReLU6",
                "ReflectionPad1d",
                "ReflectionPad2d",
                "ReflectionPad3d",
                "ReplicationPad1d",
                "ReplicationPad2d",
                "ReplicationPad3d",
                "SELU",
                "Sequential",
                "SiLU",
                "Sigmoid",
                "SmoothL1Loss",
                "SoftMarginLoss",
                "Softmax",
                "Softmax2d",
                "Softmin",
                "Softplus",
                "Softshrink",
                "Softsign",
                "SyncBatchNorm",
                "Tanh",
                "Tanhshrink",
                "Threshold",
                "Transformer",
                "TransformerDecoder",
                "TransformerDecoderLayer",
                "TransformerEncoder",
                "TransformerEncoderLayer",
                "TripletMarginLoss",
                "TripletMarginWithDistanceLoss",
                "Unflatten",
                "Unfold",
                "Upsample",
                "UpsamplingBilinear2d",
                "UpsamplingNearest2d",
                "ZeroPad2d",
                "LogSoftmaxMultidim",
                "SoftmaxMultidim",
                "EModuleDict",
                "EModuleList",
                "EModulePartial",
                "ESequential",
                "ModuleDict",
                "ModuleList",
                "ModulePartial",
                "Sequential",
                "CropDim",
                "CropDims",
                "PositionalEncoding",
                "MaskedMean",
                "MaskedSum",
                "EModule",
                "Module",
                "IndexToName",
                "IndexToOnehot",
                "NameToIndex",
                "NameToOnehot",
                "OnehotToIndex",
                "OnehotToName",
                "ProbsToIndex",
                "ProbsToName",
                "ProbsToOnehot",
                "IndicesToMultihot",
                "IndicesToMultinames",
                "MultihotToIndices",
                "MultihotToMultiIndices",
                "MultihotToMultinames",
                "MultiIndicesToMultihot",
                "MultiIndicesToMultinames",
                "MultinamesToIndices",
                "MultinamesToMultihot",
                "MultinamesToMultiIndices",
                "ProbsToIndices",
                "ProbsToMultihot",
                "ProbsToMultiIndices",
                "ProbsToMultinames",
                "NDArrayToTensor",
                "TensorToNDArray",
                "ToNDArray",
                "PadAndStackRec",
                "PadDim",
                "PadDims",
                "MultilabelToPowerset",
                "PowersetToMultilabel",
                "FFT",
                "IFFT",
                "Abs",
                "Angle",
                "Exp",
                "Exp2",
                "Imag",
                "Log",
                "Log2",
                "Log10",
                "Max",
                "Mean",
                "Min",
                "Normalize",
                "Permute",
                "Pow",
                "Real",
                "Repeat",
                "RepeatInterleave",
                "Reshape",
                "Sort",
                "TensorTo",
                "ToList",
                "Transpose",
                "View",
                "AsTensor",
                "TFlatten",
                "Identity",
                "MoveToRec",
                "PadAndCropDim",
                "RepeatInterleaveNd",
                "ResampleNearestFreqs",
                "ResampleNearestRates",
                "ResampleNearestSteps",
                "Shuffled",
                "Squeeze",
                "ToItem",
                "Topk",
                "TopP",
                "ToTensor",
                "TransformDrop",
                "Unsqueeze",
                "ViewAsComplex",
                "ViewAsReal",
            ],
        },
    )


del TYPE_CHECKING
