Skip to content
 
ml-switcheroo sparse
Type to start searching
    ml-switcheroo
    • Operation Reference
    ml-switcheroo
    • Documentation
    • ml-switcheroo πŸ”„πŸ¦˜
    • Architecture
    • Extending
    • Extending with DSL
    • Maintenance
    • Internal Architecture & Theoretical Mechanics
    • Ideas
    • Reference
    • API Reference
    • Operation Reference
      • A
      • ALiBi
      • AMax
      • AMin
      • Abs
      • Abs
      • Absolute
      • AcceleratorError
      • AccumulateN
      • Acos
      • Acos
      • Acosh
      • Acosh
      • ActivationLayer
      • ActivityRegularization
      • Adadelta
      • Adafactor
      • Adagrad
      • Adam
      • AdamW
      • Adamax
      • AdaptedTransformerFeedForward
      • AdaptiveAveragePooling1D
      • AdaptiveAveragePooling2D
      • AdaptiveAveragePooling3D
      • AdaptiveAvgPool1d
      • AdaptiveGradClipState
      • AdaptiveMaxPool1d
      • AdaptiveMaxPooling1D
      • AdaptiveMaxPooling2D
      • AdaptiveMaxPooling3D
      • Add
      • AddDecayedWeightsState
      • AddLayer
      • AddN
      • AddNoiseState
      • Addbmm
      • Addcdiv
      • Addcmul
      • AdditiveAttention
      • Addmm
      • Addmv
      • Addmv
      • Addr
      • Adjoint
      • AffineGridGenerator
      • AliasCopy
      • AlignTensors
      • All
      • AllClose
      • AllToShardedLinear
      • AlphaDropout
      • AlphaDropout
      • Aminmax
      • Angle
      • Any
      • Append
      • ApplyAlongAxis
      • ApplyIfFiniteState
      • ApplyOverAxes
      • ApproxMaxK
      • ApproxMinK
      • Arange
      • Arccos
      • Arccos
      • Arccosh
      • Arccosh
      • Arcsin
      • Arcsin
      • Arcsinh
      • Arcsinh
      • Arctan
      • Arctan2
      • Arctan
      • Arctanh
      • AreDeterministicAlgorithmsEnabled
      • ArgMax
      • ArgMin
      • ArgPartition
      • ArgSort
      • ArgWhere
      • Array
      • Array2String
      • ArrayAt
      • ArrayEqual
      • ArrayEquiv
      • ArrayIterator
      • ArrayLike
      • ArrayRepr
      • ArraySplit
      • ArrayStr
      • AsAnyArray
      • AsArray
      • AsArrayChkFinite
      • AsContiguousArray
      • AsFortranArray
      • AsMatrix
      • AsStrided
      • AsTensor
      • Asin
      • Asinh
      • AssertClose
      • Astype
      • AsyncEval
      • AtLeast1D
      • AtLeast2D
      • AtLeast3D
      • Atan
      • Atan2
      • Atanh
      • Atom
      • Attention
      • AttentionLayer
      • AttentionProjection
      • AugMix
      • AutoContrast
      • Autocast
      • AutodiffCheckpointType
      • AuxOutput
      • Average
      • AverageGradients
      • AverageLayer
      • AveragePooling1D
      • AveragePooling2D
      • AveragePooling3D
      • Avg
      • AvgPool
      • AvgPool1D
      • AvgPool2D
      • AvgPool3D
      • B
      • BFloat16
      • BFloat16Tensor
      • BLOCK_M
      • Baddbmm
      • Bartlett
      • BartlettWindow
      • BaseActivation
      • BaseNormalization
      • BatchNorm
      • BatchNormBackwardElemt
      • BatchNormBackwardReduce
      • BatchNormElemt
      • BatchNormGatherStats
      • BatchNormGatherStatsWithCounts
      • BatchNormStats
      • BatchNormUpdateStats
      • BatchNormalization
      • BatchStat
      • Bernoulli
      • BesselI0
      • BesselI0e
      • BesselI1
      • BesselI1e
      • Betainc
      • Bias
      • Bidirectional
      • Bilinear
      • BinaryCrossEntropyWithLogits
      • BinaryCrossentropy
      • BinaryFocalCrossentropy
      • Bincount
      • Binomial
      • Bit
      • BitCast
      • Bits16
      • Bits1x8
      • Bits2x4
      • Bits4x2
      • Bits8
      • BitwiseAnd
      • BitwiseCount
      • BitwiseInvert
      • BitwiseLeftShift
      • BitwiseNot
      • BitwiseOr
      • BitwiseRightShift
      • BitwiseXor
      • Blackman
      • BlackmanWindow
      • Block
      • BlockDiag
      • BlockMaskedMM
      • Bmm
      • Bool
      • BoolScalar
      • BoolTensor
      • BoolType
      • BroadcastArrays
      • BroadcastLike
      • BroadcastShapes
      • BroadcastTensors
      • BroadcastTo
      • Bucketize
      • BuildMatrix
      • BusDayCalendar
      • BusDayCount
      • BusDayOffset
      • ByteTensor
      • ByteType
      • BytesType
      • C
      • CELU
      • CTCLoss
      • Cache
      • CachedPartial
      • Call
      • CanCast
      • Capsule
      • Carry
      • CartesianProd
      • Cast
      • CastBFloat16
      • CastBool
      • CastByte
      • CastChar
      • CastDouble
      • CastFloat
      • CastHalf
      • CastInt
      • CastInt64
      • CastLong
      • CastShort
      • CategoricalCrossentropy
      • CategoricalFocalCrossentropy
      • CategoricalHinge
      • CategoryEncoding
      • CausalDepthwiseConv1D
      • CausalMask
      • Cbrt
      • Cdist
      • Ceil
      • CeilInplace
      • CeluInplace
      • CenterCrop
      • ChainMatmul
      • CharTensor
      • CharacterType
      • Checkify
      • Checkpoint
      • Cholesky
      • CholeskySolve
      • Choose
      • Chunk
      • CifgLstmCellSimple
      • CircleLoss
      • Clamp
      • ClampInplace
      • ClampMax
      • ClampMaxInplace
      • ClampMin
      • ClearCache
      • Clip
      • ClipByGlobalNormState
      • ClipGradNorm
      • ClipState
      • Clip
      • Clone
      • Code
      • ColumnConcatenation
      • ColumnStack
      • CombineMasks
      • CommonType
      • Compile
      • Complex
      • Complex128
      • Complex64
      • ComplexDouble
      • ComplexFloating
      • ComplexLongDouble
      • ComplexWarning
      • Compress
      • ComputeCv
      • ComputeMoments
      • Concat
      • Concatenate
      • ConcatenateLayer
      • ConcreteModuleType
      • ConcreteModuleTypeBuilder
      • Cond
      • ConditionallyMaskState
      • ConditionallyTransformState
      • Conformer
      • ConfusionMatrix
      • Conj
      • ConjPhysical
      • Conjugate
      • Constant
      • ConstantPadNd
      • ConstructFloat16
      • ConstructFloat32
      • ConstructFloat64
      • Contiguous
      • ControlDependency
      • ControlVariate
      • Conv
      • Conv1D
      • Conv1DTranspose
      • Conv2D
      • Conv2DTranspose
      • Conv3DTranspose
      • Conv3d
      • ConvLSTM1D
      • ConvLSTM2D
      • ConvLSTM3D
      • ConvT
      • ConvTranspose
      • ConvTranspose1d
      • ConvTranspose2d
      • ConvTranspose3d
      • Convolution1D
      • Convolution1DTranspose
      • Convolution2D
      • Convolution2DTranspose
      • Convolution3D
      • Convolution3DTranspose
      • Convolve
      • Copy
      • CopyTo
      • Copysign
      • Corrcoef
      • Correlate
      • Cos
      • Cos
      • Cosh
      • Cosh
      • CosineAnnealingLR
      • CosineEmbeddingLoss
      • CosineSimilarity
      • CosineSimilarityLoss
      • CountNonzero
      • Cov
      • Cropping1D
      • Cropping2D
      • Cropping3D
      • Cross
      • CrossEntropyLoss
      • Csingle
      • CubeRoot
      • CubedReLU
      • CudaAvailable
      • CumSum
      • Cummax
      • Cummin
      • Cumprod
      • CumulativeProd
      • CumulativeSum
      • CumulativeTrapezoid
      • CurrentUpdateContext
      • CustomAutograd
      • CustomVjp
      • CutMix
      • CvExpectedValue
      • CvState
      • DSplit
      • DStack
      • Data
      • DataLoader
      • DataParallel
      • Dataclass
      • DeepCopyMemoTable
      • Deg2Rad
      • Deg2Rad
      • Degrees
      • Delete
      • Dense
      • DepthwiseConv1D
      • DepthwiseConv2D
      • Dequantize
      • DeserializationStorageContext
      • DeserializeLoss
      • DeserializeOptimizer
      • Det
      • Detach
      • DetachCopy
      • Detach
      • Device
      • DeviceCpu
      • DeviceObjType
      • Diag
      • DiagEmbed
      • DiagIndices
      • DiagIndicesFrom
      • Diagflat
      • Diagonal
      • DiagonalCopy
      • DiagonalScatter
      • DiceLoss
      • DictType
      • Diff
      • Digamma
      • Digitize
      • DisableCompile
      • DisableTorchFunction
      • DisableTorchFunctionSubclass
      • Discretization
      • DispatchKey
      • DispatchKeySet
      • Display
      • Dist
      • DistributedSum
      • Div
      • DivMod
      • Divide
      • DivideNoNan
      • Dot
      • DotList
      • DotProductAttention
      • Double
      • DoubleStorage
      • DoubleTensor
      • Dropout
      • Dropout2d
      • Dropout3d
      • Dropout
      • Dsmm
      • Dtype
      • DtypeObject
      • E
      • ELU
      • Ediff1d
      • Eig
      • Einsum
      • EinsumDense
      • EinsumLayer
      • EinsumPath
      • EmaState
      • Embedding
      • EmbeddingBag
      • Empty
      • EmptyLike
      • EnableGrad
      • EnumType
      • Equal
      • EqualAggregate
      • EqualElementwise
      • Equalization
      • Erf
      • ErfInv
      • Erf
      • Erfc
      • ErfcInv
      • Erfc
      • ErrorReport
      • EuclideanNorm
      • EulerGamma
      • Eval
      • EvalMode
      • EvalShape
      • Event
      • ExcludeDispatchKeyGuard
      • ExecutionPlan
      • Exp
      • Exp2
      • Exp2
      • Exp
      • ExpandCopy
      • ExpandDims
      • ExperimentalEnableNumpyBehavior
      • Expm1
      • Expm1
      • ExportFunction
      • ExportToDot
      • Extract
      • Eye
      • FInfo
      • FRnn
      • Fabs
      • FakeQuantizePerChannelAffine
      • False
      • FatalError
      • FbgemmPackGemmMatrixFp16
      • FbgemmPackQuantizedMatrix
      • FeatureAlphaDropout
      • FeatureAlphaDropout
      • FeatureDropout
      • FeatureDropout
      • FeedForward
      • FileCheck
      • Fill
      • FillDiagonal
      • Fill
      • FilterAll
      • FilterAny
      • FilterState
      • FindDuplicates
      • Fix
      • Fix
      • Flatnonsense
      • Flatnonzero
      • Flatten
      • FlaxLayer
      • Flexible
      • Flip
      • Fliplr
      • Flipud
      • Float
      • Float16
      • Float32
      • Float4E2m1fnX2
      • Float4_e2m1fn
      • Float64
      • Float8E4m3fn
      • Float8E4m3fnuz
      • Float8E5m2
      • Float8E5m2fnuz
      • Float8E8m0fnu
      • Float8_e3m4
      • Float8_e4m3
      • Float8_e4m3b11fnuz
      • Float8_e4m3fn
      • Float8_e4m3fnuz
      • Float8_e5m2
      • Float8_e5m2fnuz
      • Float8_e8m0fnu
      • FloatPower
      • FloatStorage
      • FloatTensor
      • FloatType
      • Float
      • Floating
      • Floor
      • FloorDivide
      • FloorMod
      • Floor
      • Fmax
      • Fmin
      • Fmod
      • ForiLoop
      • ForkRngs
      • FormatFloatPositional
      • FormatFloatScientific
      • Frac
      • Frac
      • Frexp
      • FrobeniusNorm
      • FromBuffer
      • FromDlpack
      • FromFile
      • FromFlatState
      • FromFunction
      • FromIter
      • FromNumpy
      • FromPyFunc
      • FromString
      • FromTree
      • Ftrl
      • Full
      • FullLike
      • FullSoftmax
      • FunctionSchema
      • FusedMultiplyAdd
      • Future
      • FutureType
      • GELU
      • GLU
      • GRU
      • GRUCell
      • GShardSharedEmbeddingSoftmax
      • Gather
      • GatherMM
      • GaussianDropout
      • GaussianNoise
      • Gaussiannll
      • Gcd
      • Gcd
      • Ge
      • GeluApprox
      • GeluFastApprox
      • GenFromTxt
      • GeneralConv
      • Generator
      • Generic
      • GeomSpace
      • Ger
      • GetAbstractModel
      • GetActiveMemory
      • GetBufSize
      • GetCacheMemory
      • GetDefaultDevice
      • GetDefaultDtype
      • GetDefaultStream
      • GetDevice
      • GetErr
      • GetErrCall
      • GetFilePath
      • GetFloat32MatmulPrecision
      • GetInclude
      • GetLoss
      • GetNamedSharding
      • GetNumInteropThreads
      • GetNumThreads
      • GetOptimizer
      • GetPartitionSpec
      • GetPeakMemory
      • GetPrintOptions
      • GetRngState
      • GetState
      • GlobalAveragePooling1D
      • GlobalAveragePooling2D
      • GlobalAveragePooling3D
      • GlobalAvgPool1D
      • GlobalAvgPool2D
      • GlobalAvgPool3D
      • GlobalMaxPool1D
      • GlobalMaxPool2D
      • GlobalMaxPool3D
      • GlobalMaxPooling1D
      • GlobalMaxPooling2D
      • GlobalMaxPooling3D
      • GlobalPooling
      • Gpu
      • Grad
      • GradScaler
      • Gradient
      • Graph
      • GraphExecutorState
      • Graphdef
      • Grayscale
      • Greater
      • GreaterEqual
      • GridSampler
      • GridSampler2d
      • GridSampler3d
      • Group
      • GroupNorm
      • GroupNormalization
      • GroupQueryAttention
      • GroupedQueryAttention
      • Gt
      • HSplit
      • HStack
      • Half
      • Hamming
      • HammingWindow
      • HannWindow
      • Hanning
      • HardShrink
      • HardSigmoid
      • HardSilu
      • HardSwish
      • HardTanh
      • HasLapack
      • HasMkl
      • HasOpenmp
      • HasSpectral
      • HashTensor
      • HashedCrossing
      • Hashing
      • Heaviside
      • HingeEmbeddingLoss
      • HingeLoss
      • Histc
      • Histogram
      • Histogram2d
      • HistogramBinEdges
      • HistogramDd
      • Hsmm
      • Hspmm
      • HuberLoss
      • Hypot
      • I0
      • I0
      • IInfo
      • INTEGER
      • Identity
      • IdentityNorm
      • Igamma
      • Igammac
      • Imag
      • ImportFunction
      • ImportIrModule
      • InTopK
      • IndexAdd
      • IndexCopy
      • IndexExp
      • IndexExpression
      • IndexFill
      • IndexPut
      • IndexPut
      • IndexReduce
      • IndexSelect
      • Indices
      • Inexact
      • Inf
      • InferenceMode
      • Infinite
      • Info
      • InitNumThreads
      • InitialSeed
      • Initializer
      • InjectHyperparamsState
      • InjectStatefulHyperparamsState
      • Inner
      • Input
      • InputLayer
      • InputSpec
      • Insert
      • InstanceNorm
      • Int
      • Int16
      • Int16Tensor
      • Int32
      • Int4
      • Int64
      • Int8
      • IntTensor
      • Int
      • Intc
      • IntegerLookup
      • Interp
      • Intersect1d
      • Intp
      • Inverse
      • InverseShortTimeFourierTransform
      • Invert
      • InvertPermutation
      • IsAnomalyCheckNanEnabled
      • IsAnomalyEnabled
      • IsAutocastCacheEnabled
      • IsAutocastCpuEnabled
      • IsAutocastEnabled
      • IsAutocastIpuEnabled
      • IsAutocastXlaEnabled
      • IsAvailable
      • IsBusDay
      • IsClose
      • IsComplex
      • IsComplexObj
      • IsConj
      • IsDType
      • IsData
      • IsDeterministicAlgorithmsWarnOnlyEnabled
      • IsDistributed
      • IsFinite
      • IsFloatingPoint
      • IsFortran
      • IsGradEnabled
      • IsIn
      • IsInf
      • IsInference
      • IsInferenceModeEnabled
      • IsNaN
      • IsNaT
      • IsNeg
      • IsNegInf
      • IsNonDecreasing
      • IsNonZero
      • IsPosInf
      • IsReal
      • IsRealObj
      • IsSameSize
      • IsScalar
      • IsSigned
      • IsStorage
      • IsStrictlyIncreasing
      • IsSubDtype
      • IsTensor
      • IsVulkanAvailable
      • IsWarnAlwaysEnabled
      • IterChildren
      • IterGraph
      • IterModules
      • Iterable
      • Ix
      • JVP
      • Jagged
      • JaxLayer
      • Jit
      • KLDivergence
      • KLDivergenceLoss
      • Kaiser
      • KaiserWindow
      • KlDiv
      • Kron
      • KthValue
      • L1
      • L2Normalize
      • LBeta
      • LOWER_RIGHT
      • LSTM
      • LSTMCell
      • LU
      • LUSolve
      • Lamb
      • Lambda
      • LanguageModel
      • LanguageModelContinuousBatching
      • Layer
      • LayerNorm
      • LayerNormalization
      • LayerNormalizedLstmCellSimple
      • LayerWrapper
      • Layout
      • LazyConvTranspose1d
      • LazyConvTranspose2d
      • LazyConvTranspose3d
      • Lcm
      • Lcm
      • LdExp
      • Ldexp
      • Le
      • LeakyReLU
      • LeftShift
      • Lerp
      • Less
      • LessEqual
      • LexSort
      • Lgamma
      • LinSpace
      • Linear
      • LinearGeneral
      • LinearT
      • Lion
      • List
      • ListAdd
      • ListAverage
      • ListConcatenate
      • ListMaximum
      • ListMinimum
      • ListMultiply
      • ListSubtract
      • LittleEndian
      • LoRA
      • LoRALinear
      • LoRAParam
      • Load
      • LoadTxt
      • LobPCG
      • Log
      • Log10
      • Log10
      • Log1p
      • Log1p
      • Log2
      • Log2
      • LogAddExp
      • LogAddExp2
      • LogCoshLoss
      • LogCumSumExp
      • LogDet
      • LogSigmoid
      • LogSoftmax
      • LogSpace
      • LogSumExp
      • Log
      • Logcosh
      • LogicalAnd
      • LogicalAxisRules
      • LogicalNot
      • LogicalOr
      • LogicalXor
      • Logit
      • Logit
      • LongLong
      • LongTensor
      • Loss
      • LossScaleOptimizer
      • LstSq
      • LstmCellSimple
      • Lt
      • LuUnpack
      • M
      • MA
      • MGrid
      • MLPBlock
      • MSELoss
      • MakeAttentionMask
      • MakeCausalMask
      • ManualSeed
      • MapState
      • MarginRankingLoss
      • Marginranking
      • MaskIndices
      • MaskedFill
      • MaskedNode
      • MaskedScatter
      • MaskedSelect
      • MaskedState
      • Masking
      • MatMul
      • Matrix
      • MatrixExp
      • MatrixPower
      • MatrixRank
      • MatrixTranspose
      • Matvec
      • Max
      • MaxNumBoundingBoxes
      • MaxPool
      • MaxPool1d
      • MaxPool1dWithIndices
      • MaxPool2d
      • MaxPool3d
      • MaxPooling1D
      • MaxPooling2D
      • MaxPooling3D
      • MaxUnpool1d
      • MaxUnpool2d
      • MaxUnpool3d
      • Maximum
      • MayShareMemory
      • Mean
      • MeanAbsoluteError
      • MeanAbsolutePercentageError
      • MeanSquaredError
      • MeanSquaredLogarithmicError
      • Median
      • MelSpectrogram
      • Memmap
      • MemoryFormat
      • Merge
      • MergeContext
      • MergeState
      • MergeTypeFromTypeComment
      • Meshgrid
      • Metric
      • Min
      • MinPool
      • MinScalarType
      • MinTypeCode
      • Minimum
      • Mish
      • MixUp
      • MkldnnAdaptiveAvgPool2d
      • MkldnnConvolution
      • MkldnnLinearBackwardWeights
      • MkldnnMaxPool2d
      • MkldnnMaxPool3d
      • MkldnnRnnLayer
      • Mm
      • Mod
      • Mode
      • ModelAndOptimizer
      • Modf
      • Module
      • ModuleDict
      • ModuleList
      • MoveAxis
      • Movedim
      • Mse
      • Msort
      • Mul
      • MultiHeadAttention
      • MultiMetric
      • MultiSteps
      • MultiStepsState
      • MultiTransformState
      • Multinomial
      • Multiply
      • MultiplyNoNan
      • Muon
      • Mv
      • Mvlgamma
      • NONE
      • Nadam
      • Names
      • Nan
      • NanArgMax
      • NanArgMin
      • NanCumProd
      • NanCumSum
      • NanMax
      • NanMean
      • NanMedian
      • NanMin
      • NanPercentile
      • NanProd
      • NanQuantile
      • NanStd
      • NanSum
      • NanToNum
      • NanToNum
      • NanVar
      • Narrow
      • NarrowCopy
      • NativeBatchNorm
      • NativeChannelShuffle
      • NativeDropout
      • NativeGroupNorm
      • NativeLayerNorm
      • NativeNorm
      • NdArray
      • NdEnumerate
      • NdIndex
      • NdIter
      • Ndim
      • Ndtri
      • Negative
      • NegativeAlias
      • NegativeAlias
      • Negative
      • NestedIters
      • NewAxis
      • NextAfter
      • Nll
      • NoGrad
      • Node
      • NodeStates
      • NonNegativeParamsState
      • NonZero
      • Nop
      • Norm
      • Normal
      • Normalization
      • Normalize
      • Not
      • NotEqual
      • NotEqualAlias
      • Nothing
      • NuclearNorm
      • Number
      • Numel
      • OGrid
      • Object
      • Object
      • OfType
      • OneHot
      • Ones
      • OnesLike
      • OptArray
      • OptState
      • OptVariable
      • OptaxTest
      • OptimizedLSTMCell
      • Optimizer
      • Optional
      • OrgQr
      • OutOfMemoryError
      • Outer
      • PReLU
      • PackBits
      • Pad
      • PairwiseDistance
      • Param
      • Parameter
      • ParameterDict
      • ParameterList
      • Partition
      • PartitionName
      • PartitionState
      • PathContains
      • PerChannelSymmetric
      • PerDimScale
      • PerTensorAffine
      • PerTensorSymmetric
      • Percentile
      • Permute
      • PermuteCopy
      • PermuteDims
      • Perturbation
      • Pi
      • Piecewise
      • Pinverse
      • Pipeline
      • PipelinedTransformer
      • PixelShuffle
      • PixelUnshuffle
      • Place
      • Pmap
      • Poisson
      • PoissonLoss
      • PoissonNllLoss
      • Polar
      • Poly
      • Poly1d
      • PolyAdd
      • PolyDer
      • PolyDiv
      • PolyFit
      • PolyInt
      • PolyMul
      • PolySub
      • PolyVal
      • Polygamma
      • Pool
      • Pooling
      • Pooling1D
      • Pop
      • Positive
      • Pow
      • Power
      • PrepareMultiprocessingEnvironment
      • PreserveFormat
      • PrintOptions
      • Prod
      • ProfilerAllowCudagraphCuptiLazyReinitCuda12
      • ProjectLastDim
      • PromoteTypes
      • Ptp
      • PureState
      • Put
      • PutAlongAxis
      • PutMask
      • Pytree
      • QInt32
      • QInt8
      • QPerChannelAxis
      • QPerChannelScales
      • QPerChannelZeroPoints
      • QQLinear
      • QScale
      • QScheme
      • QUInt2x4Storage
      • QUInt4x2Storage
      • QUInt8Storage
      • QZeroPoint
      • Qqmm
      • Qr
      • Quantile
      • Quantize
      • QuantizePerChannel
      • QuantizePerTensor
      • QuantizePerTensorDynamic
      • QuantizedAllToShardedLinear
      • QuantizedBatchNorm
      • QuantizedEmbedding
      • QuantizedGru
      • QuantizedGruCell
      • QuantizedLinear
      • QuantizedLstm
      • QuantizedLstmCell
      • QuantizedMatmul
      • QuantizedMaxPool1d
      • QuantizedMaxPool2d
      • QuantizedMaxPool3d
      • QuantizedRnnReluCell
      • QuantizedRnnTanhCell
      • QuantizedShardedToAllLinear
      • Quint2x4
      • Quint4x2
      • Quint8
      • RMSNorm
      • RMSNormalization
      • RMSprop
      • RNN
      • RNNBase
      • RNNCellBase
      • RPC_AVAILABLE
      • RRefType
      • R
      • Rad2Deg
      • Rad2Deg
      • Radians
      • Rand
      • RandAugment
      • RandInt
      • RandIntLike
      • RandLike
      • RandPerm
      • Randn
      • RandnLike
      • RandomBrightness
      • RandomColorDegeneration
      • RandomColorJitter
      • RandomContrast
      • RandomCrop
      • RandomElasticTransform
      • RandomErasing
      • RandomFlip
      • RandomGaussianBlur
      • RandomGrayscale
      • RandomHorizontalFlip
      • RandomHue
      • RandomInvert
      • RandomPerspective
      • RandomPosterization
      • RandomRotation
      • RandomSaturation
      • RandomSharpness
      • RandomShear
      • RandomTranslation
      • RandomVerticalFlip
      • RandomZoom
      • Range
      • Ravel
      • RavelMultiIndex
      • ReLU
      • ReLU2
      • ReLU6
      • ReadVitals
      • Real
      • RealIfClose
      • Reciprocal
      • ReciprocalNoNan
      • Reciprocal
      • RecursiveMap
      • ReduceMin
      • ReduceProd
      • ReduceStd
      • ReduceSum
      • ReduceVariance
      • RegisterDataType
      • Relu
      • Remainder
      • Remat
      • Renorm
      • Repeat
      • RepeatInterleave
      • RepeatVector
      • ReplaceByPureDict
      • ResNet
      • Rescaling
      • Reseed
      • ResetPeakMemory
      • Reshape
      • Resize
      • Resizing
      • ResolveConj
      • ResolveNeg
      • ResultType
      • ReversibleEmbedding
      • RightShift
      • Rint
      • Rngs
      • RoPE
      • Roll
      • RollAxis
      • Roots
      • Rot90
      • Round
      • Round
      • RowStack
      • Rsqrt
      • Rsqrt
      • Rsub
      • SELU
      • SGD
      • STFT
      • STFTSpectrogram
      • STRING
      • Saddmm
      • Save
      • SaveGguf
      • SaveSafetensors
      • SaveTxt
      • SaveZ
      • SaveZCompressed
      • ScalarMul
      • ScalarTensor
      • ScalarType
      • ScaleByTrustRatioState
      • ScaleState
      • Scan
      • Scatter
      • ScatterAdd
      • ScatterReduce
      • ScriptClass
      • ScriptClassFunction
      • ScriptDict
      • ScriptDictIterator
      • ScriptDictKeyIterator
      • ScriptFunction
      • ScriptList
      • ScriptListIterator
      • ScriptMethod
      • ScriptModule
      • ScriptModuleSerializer
      • ScriptObject
      • ScriptObjectProperty
      • SeLU
      • SearchSorted
      • Seed
      • SegmentMax
      • SegmentMean
      • SegmentMin
      • SegmentProd
      • SegmentReduce
      • SegmentSum
      • SegmentedMm
      • Select
      • SelectCopy
      • SelectScatter
      • SeparableConv1D
      • SeparableConv2D
      • SeparableConvolution1D
      • SeparableConvolution2D
      • Sequential
      • SerializationStorageContext
      • SerializeLoss
      • SerializeOptimizer
      • SetAnomalyEnabled
      • SetAutocastDtype
      • SetCacheLimit
      • SetDefaultDevice
      • SetDefaultDtype
      • SetDefaultStream
      • SetDeterministicDebugMode
      • SetDiff1d
      • SetErr
      • SetErrCall
      • SetFloat32MatmulPrecision
      • SetFlushDenormal
      • SetGradEnabled
      • SetMemoryLimit
      • SetMode
      • SetNumInteropThreads
      • SetNumThreads
      • SetPrintOptions
      • SetRngState
      • SetVital
      • SetWarnAlways
      • SetWiredLimit
      • SetXor1d
      • Sgn
      • Shape
      • ShardMap
      • ShardedToAllLinear
      • SharesMemory
      • Short
      • ShortStorage
      • ShouldSkipUpdateFunction
      • ShowConfig
      • SiLU
      • Sigmoid
      • SigmoidCrossEntropy
      • Sigmoid
      • Sign
      • Signbit
      • SignedInteger
      • SimpleCell
      • SimpleRNN
      • SimpleRNNCell
      • Sin
      • Sin
      • Sinc
      • Sinc
      • Single
      • Sinh
      • Sinh
      • SinusoidalPositionalEncoding
      • Size
      • Slice
      • SliceCopy
      • SliceInverse
      • SliceScatter
      • SliceUpdate
      • Slogdet
      • Smm
      • Smoothl1
      • SnapshotState
      • SobolSample
      • SoftSign
      • Softmax
      • Softmax2d
      • Softmin
      • Softplus
      • Softshrink
      • Solarization
      • Solve
      • Sort
      • SortComplex
      • Spacing
      • SparseBsc
      • SparseBscTensor
      • SparseBsr
      • SparseBsrTensor
      • SparseCategoricalCrossentropy
      • SparseCompressed
      • SparseCompressedTensor
      • SparseCoo
      • SparseCooTensor
      • SparseCsc
      • SparseCscTensor
      • SparseCsr
      • SparseCsrTensor
      • Sparsemax
      • SpatialDropout1D
      • SpatialDropout2D
      • SpatialDropout3D
      • SpectralNorm
      • SpectralNormalization
      • Split
      • SplitCopy
      • SplitRngs
      • SplitWithSizes
      • Spmm
      • Sqrt
      • Sqrt
      • Square
      • Square
      • SquaredDifference
      • SquaredHinge
      • SquaredHingeLoss
      • Squeeze
      • SqueezeCopy
      • Sspaddmm
      • Stack
      • StackedRNNCells
      • StackedTransformer
      • Standardize
      • State
      • StaticModule
      • Std
      • StdMean
      • Step
      • StepActivation
      • StepLR
      • StochasticResidual
      • StopGradient
      • Storage
      • StorageBase
      • Stream
      • StreamContext
      • StreamObjType
      • Strided
      • StringLookup
      • StringType
      • Sub
      • Subtract
      • SubtractLayer
      • Sum
      • Svd
      • SvdLowrank
      • SwapAxes
      • Swapdims
      • Swish
      • Switch
      • SymBool
      • SymBoolType
      • SymConstrainRange
      • SymConstrainRangeForSize
      • SymFloat
      • SymFreshSize
      • SymInt
      • SymIte
      • SymMax
      • SymMin
      • SymNot
      • SymSqrt
      • SymSum
      • Symeig
      • Synchronize
      • T
      • TCopy
      • TFSMLayer
      • TUPLE
      • TYPE_CHECKING
      • T_module
      • Tabulate
      • Tag
      • Take
      • TakeAlongAxis
      • TakeAlongDim
      • Tan
      • Tan
      • Tanh
      • Tanh
      • Tanhshrink
      • TemporalShifting
      • Tensor
      • TensorSplit
      • TensorType
      • Tensordot
      • Test
      • TextVectorization
      • Threshold
      • Threshold
      • Tile
      • TimeDistributed
      • Timedelta64
      • ToDlpack
      • ToPureDict
      • ToTensor
      • TopK
      • TopKValues
      • TorchFunctional
      • TorchLoad
      • TorchModuleWrapper
      • TorchSave
      • Trace
      • TraceState
      • TrainMode
      • TrainablePositionalEmbedding
      • Transformer
      • TransformerDecoderLayer
      • TransformerEncoderDecoder
      • TransformerEncoderLayer
      • TransformerFeedForward
      • TransformerFeedForwardMoe
      • TransformerLm
      • Transformerdecoder
      • Transformerencoder
      • Transpose
      • Transpose2D
      • TransposeCopy
      • Trapezoid
      • Trapz
      • Tri
      • TriangularSolve
      • Tril
      • TrilIndices
      • TrilIndicesFrom
      • TrimZeros
      • TripletMarginLoss
      • Triu
      • TriuIndices
      • TriuIndicesFrom
      • TrueDiv
      • TrueDivide
      • True
      • Trunc
      • TruncInplace
      • TverskyLoss
      • Type
      • TypeVarA
      • TypeVarM
      • Typecodes
      • Typename
      • UByte
      • UFunc
      • UInt
      • UInt16
      • UInt32
      • UInt64
      • UInt8
      • UIntC
      • UIntP
      • ULong
      • ULongLong
      • UShort
      • Uint1
      • Uint2
      • Uint3
      • Uint4
      • Uint5
      • Uint6
      • Uint7
      • Unbind
      • UnbindCopy
      • Unflatten
      • Unfold
      • UnfoldCopy
      • Unicode
      • UnifyTypeList
      • Union1d
      • Unique
      • UniqueAll
      • UniqueConsecutive
      • UniqueCounts
      • UniqueInverse
      • UniqueValues
      • UnitNormalization
      • UnpackBits
      • UnravelIndex
      • UnsafeChunk
      • UnsafeSplit
      • UnsafeSplitWithSizes
      • UnsignedInteger
      • UnsortedSegmentMax
      • UnsortedSegmentMin
      • UnsortedSegmentProd
      • UnsortedSegmentSum
      • Unsqueeze
      • UnsqueezeCopy
      • Unstack
      • Unwrap
      • UpSampling1D
      • UpSampling2D
      • UpSampling3D
      • UpdateContext
      • UpdateCvState
      • UpdateState
      • Upsample
      • UseDeterministicAlgorithms
      • UseEagerSharding
      • V
      • VMap
      • VQNgrammer
      • Value
      • ValueAndGrad
      • ValuesCopy
      • Vander
      • VanillaBlock
      • VanillaNet
      • Var
      • VarMean
      • Variable
      • Variance
      • Vdot
      • Vecdot
      • Vecmat
      • VectorQuantization
      • VectorQuantizer
      • Vectorize
      • View
      • ViewAsComplex
      • ViewAsComplexCopy
      • ViewAsReal
      • ViewAsRealCopy
      • ViewCopy
      • VisionTransformer
      • VitEntryLayers
      • VitExitLayers
      • VitalsEnabled
      • Vjp
      • Vsplit
      • Vstack
      • Wait
      • WeightNorm
      • Where
      • WhileLoop
      • WithPartitioning
      • WrappedSchedule
      • Wrapper
      • Xdivy
      • Xlog1py
      • Xlogy
      • Xlogy
      • ZeroFraction
      • ZeroNansState
      • ZeroPadding1D
      • ZeroPadding2D
      • ZeroPadding3D
      • Zero
      • Zeros
      • ZerosLike
      • Zeta
      • __array_namespace_info__
      • activation
      • activation_relu_or_gelu
      • adaptive_average_pool
      • adaptive_grad_clip
      • adaptive_max_pool
      • add_decayed_weights
      • add_noise
      • add_scale
      • addressable_data
      • align_corners
      • alpha
      • apply
      • apply_along_axis
      • apply_gradients
      • apply_if_finite
      • apply_mask
      • apply_over_axes
      • approximate
      • args
      • array_equal
      • array_equiv
      • array_split
      • as_string
      • assert_equal
      • associative_scan
      • at
      • atleast_1d
      • atleast_2d
      • atleast_3d
      • attr
      • average_pool
      • axis
      • base
      • batch_normalization
      • batch_shape
      • beta
      • bias_correction
      • bias_hh
      • bias_ih
      • bias_k
      • bias_v
      • binary_cross_entropy
      • binary_crossentropy
      • binary_focal_crossentropy
      • bits
      • bitwise_and
      • bitwise_invert
      • bitwise_left_shift
      • bitwise_not
      • bitwise_or
      • bitwise_right_shift
      • bitwise_xor
      • bool
      • broadcast
      • broadcast_arrays
      • broadcast_shapes
      • broadcast_to
      • byte
      • cached
      • can_cast
      • cast_like
      • categorical
      • categorical_crossentropy
      • categorical_hinge
      • cdouble
      • ceil_mode
      • chain
      • char
      • character
      • children
      • chisquare
      • choice
      • cholesky_inverse
      • clear
      • clip_by_block_rms
      • clip_by_global_norm
      • clip_grad_norm
      • close
      • column_stack
      • complex
      • compute_mask
      • conditionally_mask
      • conditionally_transform
      • constant
      • constant_schedule
      • control_delta_method
      • control_variates_jacobians
      • conv1d_input
      • conv1d_weight
      • conv2d_input
      • conv2d_weight
      • conv3d_input
      • conv3d_weight
      • conv_transpose
      • conv_transpose1d
      • conv_transpose2d
      • conv_transpose3d
      • convert_to_numpy
      • convert_to_tensor
      • convex_kl_divergence
      • copy_to_host_async
      • cosine_decay_schedule
      • cosine_distance
      • cosine_onecycle_schedule
      • cosine_similarity
      • count
      • count_nonzero
      • cpu
      • create_mask
      • cross_entropy
      • ctc_decode
      • ctc_loss
      • ctc_loss_with_forward_probs
      • cumulative_prod
      • cumulative_sum
      • custom_gradient
      • d_model
      • data_ptr
      • decoder
      • depthwise_conv
      • deserialize
      • device_ids
      • device_mesh
      • device_type
      • diag_indices
      • diag_indices_from
      • dilation
      • dim
      • dims
      • dirichlet
      • div_value
      • divide_no_nan
      • dot_product_attention
      • downscale_factor
      • dropout1
      • dropout2
      • dropout3
      • eigh
      • eigvals
      • eigvalsh
      • einsum_path
      • ema
      • embedding_dim
      • empty_like
      • enable_grad
      • encoder
      • end_dim
      • eps
      • erfcx
      • estimate_control_variate_coefficients
      • euler_gamma
      • expand_dims
      • expit
      • exponential
      • exponential_decay
      • extend
      • extract_sequences
      • eye
      • f
      • fft
      • fft2
      • fftfreq
      • fftn
      • fftshift
      • fill_diagonal
      • filters
      • find_duplicates
      • flatten_parameters
      • floor_divide
      • fn
      • fori_loop
      • forward
      • freeze
      • from_dlpack
      • full_like
      • gamma
      • gammainc
      • gammaincc
      • gammaln
      • gaussian_nll_loss
      • geometric
      • get
      • get_all_with_path
      • get_item
      • get_parameter
      • get_printoptions
      • glorot_normal
      • glorot_uniform
      • greater_equal
      • group_size
      • groups
      • gumbel
      • hard_shrink
      • hard_sigmoid
      • hard_silu
      • hard_swish
      • hard_tanh
      • he_normal
      • he_uniform
      • head
      • head_dim
      • hfft
      • hidden_size
      • hinge_loss
      • histogram_bin_edges
      • huber_loss
      • ifft
      • ifft2
      • ifftn
      • ifftshift
      • ihfft
      • in1_features
      • in2_features
      • in_features
      • in_top_k
      • init
      • inject_hyperparams
      • inject_stateful_hyperparams
      • inplace
      • int2
      • interpolate
      • inv
      • invert_permutation
      • irfft
      • irfft2
      • irfftn
      • is_tensor
      • istft
      • item
      • items
      • itemsize
      • join
      • join_schedules
      • k
      • kaiming_normal
      • kaiming_uniform
      • keep_params_nonnegative
      • kernel_size
      • key
      • keys
      • kl_divergence
      • l1_loss
      • l2_loss
      • label_smoothing
      • lambd
      • laplace
      • layer_norm
      • layers
      • leaky_relu
      • left_shift
      • less_equal
      • linear1
      • linear2
      • linear_onecycle_schedule
      • linear_schedule
      • linear_to_mel_weight_matrix
      • load_state_dict
      • log_cosh
      • log_ndtr
      • log_prob
      • log_sigmoid
      • log_softmax
      • logger
      • logical_and
      • logical_not
      • logical_or
      • logical_xor
      • logistic
      • lognormal
      • long
      • lower
      • lu_factor
      • map
      • map_params
      • margin
      • margin_ranking_loss
      • mask
      • mask_check
      • mask_indices
      • mask_mod
      • masked
      • matrix_norm
      • matrix_power
      • matrix_rank
      • matrix_transpose
      • max_norm
      • max_pool
      • max_pool1d
      • max_pool2d
      • max_pool3d
      • max_val
      • measure_valued_estimation_mean
      • measure_valued_estimation_std
      • measure_valued_jacobians
      • merge_masks
      • metadata
      • min_val
      • modules
      • moments
      • momentum
      • moving_avg_baseline
      • mse_loss
      • multi_dot
      • multi_transform
      • multivariate_normal
      • n
      • name
      • named_chain
      • named_modules
      • named_parameters
      • nan_to_num
      • nbytes
      • negative_slope
      • nll_loss
      • no_grad
      • nonlinearity
      • norm1
      • norm2
      • norm3
      • norm_first
      • norm_type
      • not_equal
      • ntxent
      • num_embeddings
      • num_features
      • num_groups
      • num_heads
      • num_layers
      • one_hot
      • ones
      • ones_like
      • orthogonal
      • orthogonal
      • out_features
      • out_proj
      • output_device
      • output_ratio
      • output_size
      • p
      • padding
      • padding_idx
      • parameters
      • parameters_to_vector
      • params
      • pareto
      • pathwise_jacobians
      • per_example_global_norm_clip
      • per_example_layer_norm_clip
      • permutation
      • permute_dims
      • piecewise_constant_schedule
      • piecewise_interpolate_schedule
      • pinv
      • polynomial_schedule
      • popitem
      • predict
      • promote_types
      • psi
      • psnr
      • random_like
      • rank
      • ravel_multi_index
      • rayleigh
      • register_buffer
      • register_parameter
      • remove
      • remove_axis
      • replace
      • reset
      • reshape_weight_to_matrix
      • result_type
      • rfft
      • rfft2
      • rfftfreq
      • rfftn
      • right_shift
      • rms_norm
      • rms_normalization
      • safe_softmax_cross_entropy
      • saturate_cast
      • savez_compressed
      • scale
      • scale_factor
      • scale_grad_by_freq
      • scaled_dot_product_attention
      • scatter_update
      • score_function_jacobians
      • segment_max
      • segment_sum
      • selective_transform
      • separable_conv
      • serialize
      • set
      • set_printoptions
      • sgdr_schedule
      • shuffle
      • sigmoid_binary_cross_entropy
      • sigmoid_focal_loss
      • skip_large_updates
      • skip_not_finite
      • slice_update
      • smooth_l1_loss
      • smooth_labels
      • snapshot
      • soft_shrink
      • softmax_cross_entropy
      • softmax_cross_entropy_with_integer_labels
      • solve_triangular
      • sparse
      • sparse
        • Show Source
      • sparse_categorical_crossentropy
      • sparse_plus
      • sparse_sigmoid
      • split_key_like
      • squared_error
      • squareplus
      • start_dim
      • state_dict
      • static_graph
      • stop_gradient
      • stride
      • strides
      • svdvals
      • swap
      • take_along_axis
      • tanh_shrink
      • tensorinv
      • tensorsolve
      • test_import
      • to_dense
      • to_device
      • tolist
      • top_k
      • train
      • training
      • tree_add_scalar_mul
      • tree_l1_norm
      • tree_l2_norm
      • tree_linf_norm
      • tree_map_params
      • tree_scalar_mul
      • triangular
      • tril_indices
      • tril_indices_from
      • trim_zeros
      • triu_indices
      • triu_indices_from
      • true_divide
      • trunc_normal
      • truncated_normal
      • unflattened_size
      • uniform
      • unique_all
      • unique_counts
      • unique_inverse
      • unique_values
      • unravel_index
      • unwrap_random_key_data
      • update
      • update_infinity_moment
      • update_moment
      • update_moment_per_elem_norm
      • upper
      • upsample_bilinear
      • upsample_nearest
      • upscale_factor
      • value_and_grad
      • values
      • variant
      • vector_norm
      • vectorized_map
      • view_as_complex
      • view_as_real
      • wald
      • warmup_constant_schedule
      • warmup_cosine_decay_schedule
      • warmup_exponential_decay_schedule
      • weight
      • weight_hh
      • weight_ih
      • while_loop
      • xavier_normal
      • xavier_uniform
      • zero_grad
      • zero_nans
      • zeros
      • zeros_like
    • Show Source

    sparseΒΆ

    Auto-generated from mlx_code_defs

    PyTorch

    API: torch.nn.init.sparse_
    Strategy: Direct Mapping
    Official Docs β†—

    Apple MLX

    API: mlx.nn.init.sparse
    Strategy: Direct Mapping
    Official Docs β†—
    "Previous" sparse
    "Next" sparse_categorical_crossentropy
    © Copyright 2026, Samuel Marks.
    Created using Sphinx 9.1.0. and Material for Sphinx